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.
http://www.lispworks.com/documentation/HyperSpec/Body/f_firs...