Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on A Pythonista's Review of Haskell. Parent comment
For a correct implementation of cons, the following gives a list '("a" "b") of two strings:
(cons "a" (cons "b" ()))
In other words, if (cons "a" "bc") gives you "abc", then it's not cons.
There are no comments on this comment yet.
For a correct implementation of cons, the following gives a list '("a" "b") of two strings:
and (list "a" "b") is just sugar for the above. This doesn't work if you redefine cons on strings to mean concat.In other words, if (cons "a" "bc") gives you "abc", then it's not cons.