[math-fun] Compound CAR/CDR functions
Hello all. My apologies for this not being math related. On the PDP-1, Lisp did not seem to have the compositions of CAR and CDR (namely CAAR, CADR, CDAR, CAAAR, ...), as far as documentation goes. The PDP-6 seemed to indeed have these functions. I am wondering if any Lisps which pre-date the PDP-6 had these functions. I ask for historical clarity. Google isn't helping me much. Thanks, Robert Smith
If I'm not mistaken, each A or D adds exactly 1 instruction at the very beginning of the sequence, before falling through to the return instruction. So the cost in either the interpreter or the compiler for these compositions is minimal. So perhaps whoever implemented the Lisp put in the compositions without even being told by any design document. At 01:53 PM 10/24/2011, Robert Smith wrote:
Hello all. My apologies for this not being math related.
On the PDP-1, Lisp did not seem to have the compositions of CAR and CDR (namely CAAR, CADR, CDAR, CAAAR, ...), as far as documentation goes.
The PDP-6 seemed to indeed have these functions.
I am wondering if any Lisps which pre-date the PDP-6 had these functions. I ask for historical clarity. Google isn't helping me much.
Thanks,
Robert Smith
participants (2)
-
Henry Baker -
Robert Smith