News for hackers. Stuff that matters.
Re:The Background for CAR and CDR by lispm on Monday December 27, 2021 @07:31AM (#29701960)
Common Lisp has FIRST, SECOND, ..., TENTH and REST.

http://www.lispworks.com/documentation/HyperSpec/Body/f_firs...

Re:The Background for CAR and CDR by nomorecommas on Monday December 27, 2021 @08:29AM (#29702327)
Sure does. In my own code I prefer `NTH` for anything beyond the cadr. Or just use arrays for random access.
Re:The Background for CAR and CDR by betterunix2 on Monday December 27, 2021 @10:17AM (#29703120)
Note that "second" will not work as intended if you just have a pair; it access the second element of a list. I rarely find any use for anything beyond first, second, and rest; if I need to access nth elements I will likely switch to a different data structure.
Re:The Background for CAR and CDR by adamddev1 on Monday December 27, 2021 @07:48AM (#29702071)
Thanks, I didn't know that but edited my comment accordingly.