Is there a way to avoid having to use a function like this
(defn coerce-primitive-integer [value to-class]
(cond (= to-class java.lang.Byte) (byte value)
(= to-class java.lang.Short) (short value)
(= to-class java.lang.Integer) (int value)
(= to-class java.lang.Long) (long value))
)
in order to coerce a number to the class of another number?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---