Re:The Origin of CAR and CDR in Lisp (2005)
by TheHTMLCoder on Thursday January 04, 2018 @05:40PM
(#16074783)
Get best conversion services at one place. We convert your designed PSDs to HTML, HTML5, WordPress, WooCommerce, Magento, BuddyPress Themes. All our code is hand-written, W3C Validated, Google Page-Load Optimized, Cross-Browser, Clean & Commented. Details Here: http://www.thehtmlcoder.com/
Re:The Origin of CAR and CDR in Lisp (2005)
by kbp on Tuesday December 26, 2017 @12:29PM
(#16009583)
As noted earlier, the names first and rest date from the 70s and were already around in Lisp Machine Lisp. Also, to nitpick: in Racket, first (car) will sometimes throw when used on lists, too, if the list happens to be the empty list (which has been true for decades in Scheme). It's more correct to say that it throws when used on non-pairs/conses (aka atoms).
Well - actually most Racket programmers use pattern matching when working on trees.
Note that `first` throws an error in modern Racket when used on a non-list.