3 ms·
Yes but every structure that a cons represents can be expressed in terms of first and rest. That includes tables, singly linked lists, doubly linked lists, bina
by csmuk 13y ago
Yes but every structure that a cons represents can be expressed in terms of first and rest. That includes tables, singly linked lists, doubly linked lists, binary trees from experience.
Car and Cdr are arbitrary and legacy terms.
- mrottenkolber 13y agoArbitrary and legacy, sure, but they do serve their purpose by communicating different expectations when using a single operator. CDR? result can be anything. REST? author probably thinks the result will always be a LIST. I can think of other examples using SETF but I think I made my point clear.