Greetings,
I've stumbled across the following problem, which I believe is common and
should have some sort of generic solution. Imagine I have
... ;; code inside defn
;; I extract some information out of my atom in closure:
(swap! my-atom
(fn [val]
(let [extracted-info1 (extract-something-from val)
extracted-info2 (extract-something-else-from val)]
;; update the atom
(-> val
(assoc ...) (assoc))))) ;; out of swap!
;; still code inside defn
;; now, here I need to use those extracted-info1, extracted-info2 that I
got out of atom inside swap! operation
;; What would be the common way to pass that information here? Using vals
doesn't sound right.
Have a beer!
Tom
--
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