On Monday 15 December 2008 09:30, Mon Key wrote:
> > > > I would expect (flatten nil) => nil
>
> Why?
> => nil
> nil is not a sequence - your expectation is that Clojure flatten and
> return `nothing'... which *would* be a bug

Flattening nothing gives something?

Flatten is not consistent with seq:

user=> (flatten ())
nil

user=> (flatten [])
nil

user=> (flatten 0)
java.lang.IllegalArgumentException: Don't know how to create ISeq from: Integer

user=> (flatten nil)
(nil)


user=> (seq ())
nil

user=> (seq [])
nil

user=> (seq 0)
java.lang.IllegalArgumentException: Don't know how to create ISeq from: Integer

user=> (seq nil)
nil


> Not a bug.  Implementation deficiency/wrong expectations/
> preconceptions/mis-application of earlier idiom to new platform.

Please. A little civility, OK?


> @ http://clojure.org/lisps

Yes. I've read it.


> As I understand it, the `problem' is the interop with Java, ISeq, &
> null

This has nothing to do with Java interoperation.


> s_P


Randall Schulz

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to