5 - Define a Recursive LISP
function which takes one argument as a list and returns last element of the
list.
Implementation Code in LISP -
(defun lastFirst ( list)
(first (reverse list)))
(
OUTPUT-
(lastFirst '(1 2 3 4 5))
5
i think you need to study recursion !
ReplyDelete