3 ms·
Huh. I like the distinction of car/cdr meaning pointers vs first/rest meaning "start of list/rest of list". It weirded me out at first, but I came to really a
by pnathan 12y ago
Huh.
I like the distinction of car/cdr meaning pointers vs first/rest meaning "start of list/rest of list".
It weirded me out at first, but I came to really appreciate it.
- TeMPOraL 12y agoIndeed. It lets you clearly express in code that those cons cells are actually part of a different structure than a list.
- jwmc 12y agoYep. It's good to have both - the car is the first of a list, and the cdr is the rest, but a cons isn't always a list. Having first and rest exclusively would be short-changing us conceptually.