I'm using a multimethod to provide different functions depending on what "mode" my project is running in (it's a yada api server, and should be able to run in :dev
, :prod
modes etc).
I'm using mount/defstate
to provide a keyword:
(defstate mode :start :dev)
When I dispatch using (constantly mode)
, I get errors but when I dispatch using (fn [& _] mode)
it seems to work.
Aren't these two forms the same? Or is there some subtle difference in the way in which (or the time at which) they are evaluated?