So having parsed your log-history example Jim (which I found tricky because
of the confusion of the problem domain in your example with the
implementation, logging history versus watching changes is a bit close, and
the gratuitous use of the threading macro). I think a simpler example would
be:
(def current-live-cells (atom starting-live-cells))
(defn cells-changed
; called when current-live-cells changes
[k r o n]
(print "cells-changed called."))
(add-watch current-live-cells :log cells-changed)
Not that i'm not grateful for your example, I had to learn about (partial)
-what a useful function!- and the threading macros -yuch!-.
--
--
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.