What does the letter ‘t’ mean in LISP?
ex:
(defun last2 (lst)
(cond ((null lst) nil)
((null (cdr lst)) (car lst))
(t (last2 (cdr lst)))))
My textbook is a coursepack so it doesn’t quite explain all the meanings.
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
T is the canonical true value in Common Lisp. Here it is being used as an ELSE, ensuring that the last branch of the COND is always true. (Any value other than NIL counts as true as well.)