An Example Common Lisp Function Definition
Consider the binary trees
In Lisp,
We can define
(defun app (x y) ; Concatenate x and y. (declare (type (satisfies true-listp) x)); We expect x to end in NIL. (cond ((endp x) y) ; If x is empty, return y. (t (cons (car x) ; Else, copy first node (app (cdr x) y))))) ; and recur into next.
If you defined this function in some Common Lisp, then to run
(app '(A B) '(C D E))
and Common Lisp will print the result