A better API for this particular use suggested itself to me: simply allow
the state to be nil, and require the functions that are sent initialize the
state if necessary. Code like:
(defn my_f [ state ]
(let [ state (or state (init-function)) ]
...
In this case, it doesn't matter which f is the first f executed, it
initializes the state, and everything works.
Brian
--
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