As names, car and cdr are great: short, and just the right visual distance apart. The only argument against them is that they're not mnemonic. But this is a weak argument.
-
-
Yeah that’s true. I guess it’s similar with dictionaries as well. Since I’ve been working a lot with Elixir/Erlang, head and tail tend to make more sense working with stream oriented languages. I think it’s easy to sometimes forget the cons underlying all the s-expressions.
-
How do you feel about Clojure’s first and rest (or second in lieu of cadr)? I remember reading an old Steve Russell email about how both he and McCarthy tried to switch people from car and cdr to first and rest for two pointers in a list node (address and decrement stuck).
End of conversation
New conversation -
-
-
fst | snd, left | right, west | east (kidding)
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.