Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



Yep. 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.


Indeed. It lets you clearly express in code that those cons cells are actually part of a different structure than a list.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: