On Wed, Oct 5, 2011 at 5:02 AM, Sean Bowman <pico...@gmail.com> wrote:
> Here's my first attempt (obviously it doesn't work, but might help
> clarify what I'm getting at):
>
>    (defmacro unique?
>      "Is the given value unique to the record?"
>      [name value message]
>      `(if-not (str/blank? ~value)
>         (let [finder# (symbol (str "by-" (name ~name)))
>               existing# (finder# ~value)]
>           (if existing# (duplicate existing# ~message ~value)))))
>
> (The "duplicate" function raises the exception.)

What is the exception? Does namespace qualifying `duplicate` help?

Regards,
BG

-- 
Baishampayan Ghose
b.ghose at gmail.com

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