9 - Define a Recursive LISP function which appends
two lists together.
Implementation Code in LISP -
(defun func( l1 l2)
(if ( null l1) l2
(cons ( first l1) (func (rest l1) l2))))
OUTPUT-
(func '(1 2 3) '(4 5 6))
(1 2 3 4 5 6)
Implementation Code in LISP
(
(
OUTPUT-
(
(1 2 3 4 5 6)
No comments:
Post a Comment