Hey, sorry for reanimating this thread. I stumbled upon the same problem, but I think it actually goes deeper than just a different design choice between clj and cljs (being, one throwing an exception the other returning nil).
`(apply max [])` does not return null (nil), it actually returns js/undefined (nil). Additionally `(max)` throws a wrong number of arguments (2) exception. Which alone I think is a bug, since it was called with 0 arguments. Clojure is much more consistent in this regard. Both `(max)` and `(apply max [])` throw a wrong arity exception, correctly stating that the call was done with 0 arguments. All the best, Jan Am Montag, 17. August 2015 21:48:52 UTC+2 schrieb Jonathan Leonard: > Clojure: > > (apply max (map :id nil)) > clojure.lang.ArityException: Wrong number of args (0) passed to: core$max > > ClojureScript: > cljs.user=> (apply max (map :id nil)) > nil > > Is this by design? -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/clojurescript.
