On Oct 29, 2:20 pm, Paul Drummond
I don't know, but...
> Would be nice to be able to use:
>
> (abs -1.0)
> 1
> (abs 1.0M)
> 1M
How about this:
(defn abs [x]
(if (< x 0) (- x) x))
This does what you requested:
user=> (abs -1.0)
1.0
user=> (abs 1.0M)
1.0M
Konrad.