(defun last-char(list1)
(cond ( (null list1) nil )
( (null (cdr list1)) (car list1) ) ; null (cdr list1) returns T when 1 item is left in the list
(t (last-char (cdr list1)))
)
)
(cond ( (null list1) nil )
( (null (cdr list1)) (car list1) ) ; null (cdr list1) returns T when 1 item is left in the list
(t (last-char (cdr list1)))
)
)
Comments
Post a Comment