Hi,

On May 26, 12:41 pm, YD <ydong.pub...@gmail.com> wrote:

> (defmacro bound-fn
>   [& fntail]
>   `(bound-fn* (fn ~...@fntail)))
>
> Shouldn't it be: (fn [] ~...@fntail) ?
>
> If you try to use this function by passing more than one function as
> arguments to it, you'll get an exception. e.g. (bound-fn f1 f2)
>
> I'm a newbie to clojure and I'm not quite sure if this is a bug.

It's not a bug. The idea of bound-fn is to *define* a bound
function. So instead of saying (fn [a b c] (do-things)) you
say (bound-fn [a b c] (do-things)).

If you already have a function, which you want to turn into
a bound function use bound-fn*: (bound-fn* f1) (bound-fn* f2).

Sincerely
Meikel

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