I'm having trouble using clojure.contrib.monads/m-seq in a macro.
Let's say that I just want to create a macro version of m-seq.

Clojure 1.0.0-
user=> (use 'clojure.contrib.monads)
nil
user=> (with-monad maybe-m (m-seq [1 2 3]))
(1 2 3)
user=> (defn a [& xs]
(with-monad maybe-m (m-seq [1 2 3])))
#'user/a
user=> (a [1 2 3])
(1 2 3)
user=> (defmacro b [& xs]
`(with-monad maybe-m (m-seq ~xs)))
#'user/b
user=> (b [1 2 3])
java.lang.IllegalArgumentException: Wrong number of args passed to:
LazilyPersistentVector (NO_SOURCE_FILE:0)

So there's something wrong with how I'm phrasing the macro. But I
can't figure out what's going on.


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