Apply a function symbol or a unary lambda expression to each element of a list of terms, obtaining a list of corresponding terms.
(apply-unary-to-terms fn terms) → applied-terms
Function:
(defun apply-unary-to-terms-aux (fn terms rev-result) (declare (xargs :guard (and (pseudo-termfnp fn) (pseudo-term-listp terms) (pseudo-term-listp rev-result)))) (declare (xargs :guard (or (symbolp fn) (= 1 (len (lambda-formals fn)))))) (let ((__function__ 'apply-unary-to-terms-aux)) (declare (ignorable __function__)) (cond ((endp terms) (reverse rev-result)) (t (apply-unary-to-terms-aux fn (cdr terms) (cons (apply-term* fn (car terms)) rev-result))))))
Function:
(defun apply-unary-to-terms (fn terms) (declare (xargs :guard (and (pseudo-termfnp fn) (pseudo-term-listp terms)))) (declare (xargs :guard (or (symbolp fn) (= 1 (len (lambda-formals fn)))))) (let ((__function__ 'apply-unary-to-terms)) (declare (ignorable __function__)) (apply-unary-to-terms-aux fn terms nil)))