Hacker News new | ask | show | jobs
by sigzero 2233 days ago
Racket has `first` and `rest`. I just tried it. But I tried an online scheme interpreter and it did not have it.
1 comments

first and rest are in racket, but racket has many things not in scheme (and doesn't have some things that are.) If you use the r5rs #lang (e.g. `racket -I r5rs`) you'll see that it doesn't have first and rest.

Also, first and rest in racket aren't synonyms for car and cdr. car and cdr take pairs, while first and last only take lists. Try this: (car '(1 . 2)) and (first '(1 . 2))