Apply a function symbol or a lambda expression to a list of terms, obtaining a term.
(apply-term fn terms) → term
This utility is similar to cons-term,
but it performs a beta reduction when
Function:
(defun apply-term (fn terms) (declare (xargs :guard (and (pseudo-termfnp fn) (pseudo-term-listp terms)))) (declare (xargs :guard (or (symbolp fn) (= (len terms) (len (lambda-formals fn)))))) (let ((__function__ 'apply-term)) (declare (ignorable __function__)) (cond ((symbolp fn) (cons-term fn terms)) (t (subcor-var (lambda-formals fn) terms (lambda-body fn))))))