(defun heap-front (heap) (if (heap-empty-p heap) (error "heap is empty") (funcall (heap-value-fn heap) (aref (heap-array heap) 0))))