Computer Science - Artificial Intelligence - Discussion
Discussion Forum : Artificial Intelligence - Section 1 (Q.No. 21)
21.
In LISP, the function returns the first element of a list Is
Discussion:
4 comments Page 1 of 1.
Ilham Khan said:
2 years ago
In the Jargon, car is "non-destructive'. This feature turns out to be important. The CDR of a list is the rest of the list, that is, the cdr function returns the part of the list that follows the first item. If it were not, the Lisp interpreter would try to evaluate the list by calling rose as a function.
Sidra said:
2 years ago
But car is an object. How an object relate to function return value? Please anyone explain in detail.
Vishal said:
7 years ago
It is a system in-built function in lisp library.
It returns the first element of a string or a digit.
It returns the first element of a string or a digit.
Ahmed said:
7 years ago
Why is the answer car? Please describe it.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers