>
> Can anyone explain to me what's happening here? Something about creating a
> anonymous function?
>
The problem is not creating the anonymous function but that it closes over
the matrix argument. The closure passed on to blah will keep a reference to
matrix until blah returns. This won't happen if the anonymous function
takes the matrix as a parameter:
(defn blah [func v] (func v))
(defn load-exp [matrix]
(blah
(fn [m] (dorun (map identity m))) matrix))
--
--
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
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.