4 ms·
Common Lisp has FIRST, SECOND, ..., TENTH and REST. http://www.lispworks.com/documentation/HyperSpec/Body/f_firstc.htm#first http://www.lispworks.com/documenta
by lispm 5y ago
Common Lisp has FIRST, SECOND, ..., TENTH and REST.
http://www.lispworks.com/documentation/HyperSpec/Body/f_firstc.htm#first http://www.lispworks.com/documentation/HyperSpec/Body/f_firs...
- adamddev1 5y agoThanks, I didn't know that but edited my comment accordingly.
- nomorecommas 5y agoSure does. In my own code I prefer `NTH` for anything beyond the cadr. Or just use arrays for random access.
- betterunix2 5y agoNote 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.