1. 3
  1.  

  2. 2

    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.

    1. 2

      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*)
      

      And the first appearance of list? was:

      commit 3f0cef5142672ea1a9f881477135565b316a2796
      Author: Rich Hickey <richhickey@gmail.com>
      Date:   Fri Sep 5 15:52:08 2008 +0000
      
          added many predicates
      

      My read from that is that list? was added later intentionally as a way to differentiate from seq?.

      1. 2

        added many predicates

        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.

        1. 1

          Thanks for the explanation.

      2. 1

        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/