This is one of those things I was always embarrassed about explaining to Clojure newcomers. Of course it’s important to understand seqs and laziness, but the fact that there are many lists for which the list? predicate returns false for is just a stupid accident of history where a patch got merged carelessly without taking time to understand its implications, and people have tried to rationalize it retroactively.
stupid accident of history where a patch got merged carelessly without taking time to understand its implications, and people have tried to rationalize it retroactively.
Source?
Seems like the first appearance of seq? was:
commit 86dd57ad4e8d1cbe6a46a45d6eb5df5711373fe9
Author: Rich Hickey <richhickey@gmail.com>
Date: Mon Feb 4 16:57:57 2008 +0000
added string? symbol? map? vector? seq? nthrest
first cut at destructuring let (let*)
I completely disagree with this and I wrote up a post coming at it from the design perspective to try to give a different mental model to explain why list? does what it does.
This is one of those things I was always embarrassed about explaining to Clojure newcomers. Of course it’s important to understand seqs and laziness, but the fact that there are many lists for which the
list?predicate returns false for is just a stupid accident of history where a patch got merged carelessly without taking time to understand its implications, and people have tried to rationalize it retroactively.Source?
Seems like the first appearance of
seq?was:And the first appearance of
list?was:My read from that is that
list?was added later intentionally as a way to differentiate fromseq?.A former co-worker claimed this patch was submitted by him before the switch to git made it possible to attribute patches to non-committers.
Thanks for the explanation.
I completely disagree with this and I wrote up a post coming at it from the design perspective to try to give a different mental model to explain why list? does what it does.
http://insideclojure.org/2016/03/16/collections/