4 ms·
I'm learning LISP through this book, and it's fun! On p.42, when explaining the c*r functions, I found it easier to just read the "sequence" right-to-left. Fo
by brisance 16y ago
I'm learning LISP through this book, and it's fun!
On p.42, when explaining the c*r functions, I found it easier to just read the "sequence" right-to-left.
For example:
(cadadr '((peas carrots tomatoes) (pork beef chicken) duck))
BEEF
Read as "rest, first, rest, first" of the cons cells, where "a" means "first" and "d" means "rest of the cons cell(s)".
Aside: I am now beginning to appreciate Clojure more. :P
- deleted 16y ago[deleted]