3 ms·
If I recall correctly, UTLISP on the CDC-6600 did this up to six levels. UTLISP stored 3 18-bit pointers in a 60 bit word, plus flag bits. The three pointers we
by neonscribe 17y ago
If I recall correctly, UTLISP on the CDC-6600 did this up to six levels. UTLISP stored 3 18-bit pointers in a 60 bit word, plus flag bits. The three pointers were called the CAR, CDR and CSR. CONS only took two arguments, but you could set the CDR using RPLACS (analogous to RPLACA and RPLACD). All 729 functions C[ADS]{1,6}R were available, but not by having 729 actual function definitions, which would have been a significant waste of address space and core in those days. The undefined function handler would check the name of the function being called and construct the definition on the fly for interpreted code, while the compiler would do something similar during compilation. This trick dates back to the 1970s or possibly even the late 60s. I think it was also used in other early Lisp implementations.