On Sat, 26 May 2001, Mike Nordell wrote:

> Could someone explain these TLAs?

They're the standard pair accessors in LISP-like languages, where you
create a pair with cons:

[plam@plam plam]$ guile
guile> (cons 2 "foo")
(2 . "foo")
guile> (car (cons 2 "foo"))
2
guile> (cdr (cons 2 "foo"))
"foo"

Page 76 of _Structure_and_Interpretation_of_Computer_Programs_ says that
cons stands for construct; furthermore, `car and cdr relate to the
original implementation of Lisp on the IBM 704.  That machine had an
addressing scheme that allowed one to reference the "address" and
"decrement" parts of a memory location.  Car stands for "contents of
address register" and cdr (pronounced "could-er") stands for "contents of
decrement register."'

pat



Reply via email to