How to generically coerce a number to the class of another number???

2009-06-24 Thread arasoft
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.L

Re: How to generically coerce a number to the class of another number???

2009-06-24 Thread Meikel Brandmeyer
Hi, Am 24.06.2009 um 14:21 schrieb arasoft: 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) (