|
|
|
|
|
by iLemming
752 days ago
|
|
It's not "failing" on the simplest basic list cons'ing, it did what's expected, it consed the list. You're trying language features without even bothering to ask if the function you're using does what you think it does. Have you read the docstring for (list?)? It says "Returns true if x implements IPersistentList". (cons 1 '(2 3)) results in a clojure.lang.Cons not the instance of clojure.lang.PersistentList. A clojure dev would be using (seq? (cons 1 '(2 3))) instead of what you tried. Maybe before hating something so fervently try to learn it a bit more first? |
|
Well, no kidding.
> (cons 1 '(2 3)) results in a <Java thing> not the instance of <another Java thing>.
:)