This article is rated C-class on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||||||||||||||
|
"First and Rest are modern alternatives..."
edit"The names first and rest are common modern alternatives to car and cdr due to their greater clarity."
Here is a paper from 1959 that suggests otherwise.
ftp://publications.ai.mit.edu/ai-publications/pdf/AIM-008.pdf
John McCarthy invented LISP, and in this paper from 1959 shows the use of "first" and "rest" as equivalents to "car" and "cdr". —Preceding unsigned comment added by 98.96.168.230 (talk) 08:11, 19 September 2008 (UTC)
- Looks like clear and incontrovertible evidence to me. I changed the article. -- BenRG (talk) 10:41, 19 September 2008 (UTC)
"Use in conversation"
editRemoved. Not in the least notable or relevant, and beyond that, unsourced/unreferenced. Zero sharp 20:20, 12 June 2007 (UTC)
- Is Jargon File a good enough source? http://www.catb.org/jargon/html/C/cdr.html Grue 13:40, 13 June 2007 (UTC)
"form"
editNot being an experienced lisper, I don't see any connection between
(lambda (a b) (one-thing) (another-thing))
and
(let ((p1 (caadr form)) (p2 (cadadr form)) (body (cddr form)) ...)
What is "form" ? The list of formal parameters? Or is it a keyword with a special meaning understood by every lisper, such as lambda or cons?
Aleph4 (talk) 10:36, 19 March 2008 (UTC)
- It's the datum
'(lambda (a b) (one-thing) (another-thing))
. It is a rather strange example in that it's hard to think of a situation where you could rely on a lambda form having exactly two parameters. More realistically you would bindparams
to(cadr form)
and then use list operations on that, but that would spoil this laudable attempt to find a use for thecadadr
function... -- BenRG (talk) 20:21, 20 March 2008 (UTC)
NPOV re first and rest
editI removed a recent NPOV tag that gave as its reason "CAR and CDR are fundamental ops on a two cell data structure; FIRST and SECOND would be alternatives; FIRST and REST carry the implication of a list or n-tuple.|date=April 2017." This article is describing the the historical origins of the first, rest usage which apparently has been generally accepted. This is not the place to argue whether that choice was wise.--agr (talk) 20:00, 21 April 2017 (UTC)
- The statement that first and rest are sometimes preferred is in WP's voice. The reliance on an early paper is synthesis.
- McCarthy's 1959 paper is about s-expressions (lists). It does not mention car or cdr. First and rest do not make sense in the context of the "dotted" pairs of an association list. Car and cdr were more fundamental than first and rest; first and rest were dropped by 1.5.
- First and rest are only preferred when the context is a list or s-expr.
- Glrx (talk) 19:00, 28 April 2017 (UTC)
Pronunciation
editThe audio file File:US-Lisp-CDR.ogg by Rfc1394 sounds like /ˈkudər/, not like /ˈkʊdər/ as the article says. Many sources clearly say it is pronounced as the latter: [1], [2]. Could anyone confirm that and correct the audio file? — TAKASUGI Shinji (talk) 01:00, 8 November 2018 (UTC)