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 <jawo...@berkeley.edu>

>
> 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 clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to