Re:The Origin of CAR and CDR in Lisp (2005)
by kazinator on Tuesday December 26, 2017 @01:39PM
(#16010092)
TXR is a new Lisp dialect (project started in 2009) with real conses, car and cdr. Plus some little embellishments in that area:
This is the TXR Lisp interactive listener of TXR 188.
Quit with :quit or Ctrl-D on empty line. Ctrl-X ? for cheatsheet.
1> (defstruct kar nil
kar kdr
(:method car (me) me.kar)
(:method cdr (me) me.kdr))
#<struct-type kar>
2> (new kar kar 1 kdr 2)
#S(kar kar 1 kdr 2)
3> (car *2)
1
4> (cdr *2)
2
:)
TXR Lisp has the cadr accessors down to depth five (caar to cddddr).
This stuff is not "muck" to be jettisoned; it is part of the essence without which we don't have Lisp.
TXR Lisp has the cadr accessors down to depth five (caar to cddddr).
This stuff is not "muck" to be jettisoned; it is part of the essence without which we don't have Lisp.