You're not using macros correctly.

A macro does not evaluate its arguments, but it does evaluate its return
value. The only thing a macro should do is to transform one piece of code
into another.

So let's look at what you want your syntax to look like:

    (send! (function-blah "hi!"))

Now consider how it would have to look if you were using a function instead:

    (send!* 'function-blah "hi!")

Notice how we've quoted the function name and removed the surrounding list.

All your macro needs to do is to convert the first form into the second. So
you'd write something like:

    (defmacro send! [[func & args]]
      `(send!* (quote ~func) ~@args))

Generally speaking, you should prefer functions over macros wherever
possible. If you must have a macro, make it a slim wrapper around a
function.

I don't know what the rest of your function is supposed to be doing. The
use of core.async and resolve is very odd. Could you elaborate on its
purpose?

- James


On 7 March 2015 at 03:40, coco <clasesparticulares...@gmail.com> wrote:

> sorry for my crappy code, but I was changing some conditions and testing my 
> parameters before and I end with this code
>>
>> (if (not (false? res))
>      res
>
>   (recur))
>
> I must write just
>
> (if  res
>      res
>
>   (recur))
>
>
>  --
> 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
> Note that posts from new members are moderated - please be patient with
> your first post.
> 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
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to