News for hackers. Stuff that matters.
Re:The Origin of CAR and CDR in Lisp (2005) by AlbertoGP on Monday December 26, 2016 @02:06PM (#13259344)
That's right, but I would go one step further and have F(irst) and R(est), with obvious composition as follows: (using kruhft's examples from another thread)

    (ff  x) == (caar  x) == (car (car x))
    (rrf x) == (cddar x) == (cdr (cdr (car x)))
I would argue that it's worth sacrificing the 'f' and 'r' symbols for such a common construct.

If not, a common prefix (lacking in HD and TL) could be used:

    (.ff  x) == (caar  x) == (car (car x))
    (.rrf x) == (cddar x) == (cdr (cdr (car x)))
Yes, I realize I'm 55 years late to the party.

There are no comments on this comment yet.