Hi James,

You can acheive the same thing with type hints:
     (defn abs [#^Double x] (Math/abs x))

Cheers

Tom

2009/2/11 Jason Wolfe <[email protected]>

>
> Never mind, silly me.  Of course, the identity of the method is not
> the issue, it's the type of the argument.
>
> user> (defn abs [x] (let [x (double x)] (Math/abs x)))
> #'user/abs
> ; no reflection warning.
>
> -Jason
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to