Talk:Cons

Misleading image
The image at the start of the section "List" is (somewhat) misleading. The cdr of the last cons pair is not a pointer to NIL, but the value NIL. 212.17.78.158 (talk) 13:01, 7 May 2024 (UTC)

Not fundamental
Could somebody check those definitions? They don't look right and they don't seem to work. 84.191.247.10 (talk) 23:26, 19 August 2008 (UTC)


 * They look fine to me. Tried them out under guile and they worked as expected. (Named them mycons, mycar, and mycdr because I didn’t want to clobber the built-in functions.) --Malirath (talk) 17:40, 31 March 2009 (UTC)


 * I'm not clear on how you could think they aren't right or how they might "seem" not to work, unless you simply don't understand the notation or the subject matter -- in which case you should just say so. cons returns a closure that applies a function to the two values. car invokes the closure with a function that returns the first value, and cdr invokes the closure with a function that returns the second value -- it couldn't be much simpler or more straightforward. -- 98.108.225.155 (talk) 07:25, 19 November 2010 (UTC)


 * I'm new to scheme, but just trying the cons definition in common music (a scheme) did not do the same thing as cons. specifically:
 * (define (mycons x y)
 * (lambda (m) (m x y)))
 * and then (mycons 3 5) returns #. How is this returned function supposed to be called?
 * this is not the same as (cons 3 5), which returns the dotted pair (3 . 5). At any rate some clarification or reference would be helpful to those new to thinking functionally such as myself — Preceding unsigned comment added by Sebfumaster (talk • contribs) 05:42, 16 September 2014 (UTC)

snoc
I'm tempted to remove the recent addition of Cons. is a primitve operation, but  is not. is a cute name for what Lisp would refer to as (with args reversed)  or. It is not a common operation and seems to have little merit. Append is a clearer name, and real code might use a trailing pointer. If snoc needs to be explained, then it can be explained there instead of redirecting here. Glrx (talk) 00:46, 16 January 2014 (UTC)


 * Why does that mean you should remove it? This article is not bloated. Crasshopper (talk) 11:52, 20 April 2015 (UTC)


 * Anon here, Am working on a research language, and the need for a snoc-like function came up because it would eliminate a copy. I don't think I should have had to come to the Talk section to see the idea discussed.  — Preceding unsigned comment added by 173.19.237.184 (talk) 23:24, 14 May 2015 (UTC)


 * snoc is a common term in functional programing and it should have a subsection in this article. In general it would be good to write the article such that it abstracts away from Lisp, since Nil/Cons representation of lists is a functional programing concept not restricted to Lisp. --Tobias (Talk) 13:24, 14 May 2019 (UTC)

"ordered pairs of simplex data"
Which of the many definitions does simplex (disambiguation) mean in this article? Crasshopper (talk) 11:47, 20 April 2015 (UTC)

External links modified
Hello fellow Wikipedians,

I have just modified one external link on Cons. Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:
 * Added archive https://web.archive.org/web/20100331083602/http://www.st.cs.ru.nl/papers/2006/janj2006-TFP06-EfficientInterpretation.pdf to http://www.st.cs.ru.nl/papers/2006/janj2006-TFP06-EfficientInterpretation.pdf

When you have finished reviewing my changes, you may follow the instructions on the template below to fix any issues with the URLs.

Cheers.— InternetArchiveBot  (Report bug) 08:15, 12 August 2017 (UTC)