On 02.11.2010, at 13:34, Ken Wesson wrote:

> This wouldn't work?:
> 
> (with-monad sequence-m
>   (defn ntuples [n xs]
>      (apply (m-lift n list) (replicate n xs))))

No.

> (If m-lift is a macro that requires the arity arg to be known at 
> macroexpansion time:
> 
> (with-monad sequence-m
>   (defn ntuples [n xs]
>      (apply (eval `(m-lift ~n list)) (replicate n xs))))
> 
> instead. Icky, mind you.)

That should work. But once you are at that level of Lisp proficiency, you 
should also have heard the "eval is evil" lesson a few times ;-)

Konrad.

-- 
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

Reply via email to