[amp_mcq option1=”returns a new list that is equal to by copying the top-level element of” option2=”returns the length of” option3=”returns t if is empty.” option4=”All of the above E. None of the above” correct=”option1″]
The correct answer is: E. None of the above
The function (endp) in LISP returns t if the list is empty, and nil otherwise. It does not return a new list, nor does it return the length of the list.
Here is an example:
(endp '()) ; returns t
(endp '(1 2 3)) ; returns nil