=> (type identity) clojure.core$identity
On Wed, May 22, 2013 at 7:17 PM, Peter Mancini <[email protected]>wrote: > So I did some coding and came up with this but it is broken; > > (= java.lang.Boolean (type false)) ;;evaluates to true > > (defn all-true? > [coll] > (every? (cond (= java.lang.Boolean (type identity)) identity :else > false) coll)) ;;compiles > > (all-true? '(true true true)) ;; throws java.lang.ClassCastException: > java.lang.Boolean cannot be cast to clojure.lang.IFn > (all-true? '(true true false)) > (all-true? '(true true 3)) > > -- > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to [email protected] > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
