In LISP, the function returns t if is a CONS cell and nil otherwise __________ A. (cons ) B. (consp ) C. (eq ) D. (cous = )

(cons <object>)
(consp <object>)
(eq <object>)
(cous = <object>)

The correct answer is B. (consp ).

A CONS cell is a data structure in Lisp that consists

288 448 288 448s170.8 0 213.4-11.5c23.5-6.3 42-24.2 48.3-47.8 11.4-42.9 11.4-132.3 11.4-132.3s0-89.4-11.4-132.3zm-317.5 213.5V175.2l142.7 81.2-142.7 81.2z"/> Subscribe on YouTube
of two pointers, a car and a cdr. The car pointer points to an object, and the cdr pointer points to another CONS cell or nil. The function (consp ) returns t if is a CONS cell and nil otherwise.

The function (cons ) creates a new CONS cell with as the car and nil as the cdr.

The function (eq ) returns t if is equal to the object passed as the argument, and nil otherwise.

The function (cous = ) is not a valid Lisp function.

Exit mobile version