On Tue, Dec 16, 2008 at 12:26 AM, Mon Key <s...@derbycityprints.com> wrote: > > whoops, chopped of the end of that last message - forgot the nasake-no > ichigeki > user> (seq? '(nil)) > ==|]======>true
'(nil) is a list containing the single element nil. nil is no kind of list whatsoever. So, (seq? '(nil)) is true, since '(nil) is a list and lists are seqs and (seq? nil) is false since nil is not a sequence. The quoted list equivalent of (seq? nil) is not (seq? '(nil)), it's (seq? '()) and it rightly returns false: 1:1 user=> (seq? '()) false This is why flatten's behavior was considered a bug. In Clojure, an empty sequence is equivalent to nil, not to '(nil). HTH, - J. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---