I usually store vars to functions when developing in the REPL. The practical difference is that when you redefine `foo' in the above example, calls via the `actions' map will use the "old" function as the function itself ist stored, while after redefining `bar' calls through `actions' will use the redefined function.
There are other benefits, as thread-local bindings etc. You can read more about that on the http://clojure.org homepage. On Sun, Sep 2, 2012 at 2:34 PM, [email protected] <[email protected]> wrote: > > I tend to like 1 better. I do not like working with vars without a good > reason. > > -- > 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 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
