Hi Anand,

Here is an example from core.clj:
(definline doubles
  "Casts to double[]"
  [xs] `(. clojure.lang.Numbers doubles ~xs))

As you can see it is using macro magic as you would expect for in-
lining.


Regards,
Tim.


On Jan 25, 11:06 pm, Anand Patil <anand.prabhakar.pa...@gmail.com>
wrote:
> Hi all,
>
> I'd like to repeat my request for an example of definline usage; I
> feel I've tried everything.
>
> user=> (definline f [x] x)
> java.lang.ExceptionInInitializerError (NO_SOURCE_FILE:1)
> user=> (definline [x] x)
> java.lang.NullPointerException (NO_SOURCE_FILE:2)
> user=> (definline (f [x] x))
> java.lang.NullPointerException (NO_SOURCE_FILE:3)
> user=> (definline (defmacro f [x] x))
> java.lang.NullPointerException (NO_SOURCE_FILE:4)
> user=> (definline f)
> java.lang.NullPointerException (NO_SOURCE_FILE:12)
>
> Thanks,
> Anand
--~--~---------~--~----~------------~-------~--~----~
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