News for hackers. Stuff that matters.
Re:The Origin of CAR and CDR in Lisp (2005) by ghettoimp on Tuesday December 26, 2017 @05:00PM (#16011317)
Too bad we couldn't just have "nth" and call it a day.
Re:The Origin of CAR and CDR in Lisp (2005) by flavio81 on Tuesday December 26, 2017 @10:06PM (#16012547)
We do have it, it is called "elt" in Lisp.
Re:The Origin of CAR and CDR in Lisp (2005) by kbp on Wednesday December 27, 2017 @11:12AM (#16015560)
> We do have it, it is called "elt" in Lisp.

In Common Lisp, ELT is generic over sequences, so it also works on arrays. CL also has a function actually called NTH which is specific to lists; NTH was also in Maclisp, Lisp Machine Lisp, etc with the same meaning (Interlisp had an NTH function but it's what Common Lisp calls NTHCDR (except that Interlisp NTH used 1-based indexing whereas CL NTHCDR uses 0-based)). Emacs Lisp uses the same nth/elt distinction as Common Lisp. Islisp has elt which is generic over sequences, but I believe that it discarded nth.