Discussion
In LISP the function that provides the initial element of a list is :
Answer: A
The function is car.
In LISP, (car '(a b c)) returns a, the first element of the list, and cdr returns the rest of the list, (b c). The names come from the IBM 704 register fields used in the original implementation.
set assigns a value to a symbol. second returns the second element. Common Lisp also defines first as a synonym, but the primitive LISP function the question has in mind is car.
No comment is present. Be the first to comment.
Loading…
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development