Hi,
On Aug 3, 10:10 pm, John Harrop <[email protected]> wrote:
> (defn and-ns
> "A non-short-circuiting \"and\" usable in reduce etc."
> ([] true)
> ([a] a)
> ([a b] (and a b))
> ([a b & more] (reduce and-ns (and a b) more)))
Don't think to complicated.
(reduce #(and %1 %2) coll)
This should do the trick, no? It's still non-short-circuiting, though.
I think memfn is some relict like .., which pre-dates some
of the nice additions to clojure.
#(.foo %1 %2 fixed-arg %3)
That should fill all the needs, which might come up. (Besides
an unknown method name, but for that you'll need reflection,
AFAIK...)
Sincerely
Meikel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---