Merge pull request #51 from ideal-knee/patch-1

Make `:start` value a function call.
This commit is contained in:
Anatoly 2016-02-29 12:07:28 -05:00
commit 9131cbb17a

View file

@ -91,7 +91,7 @@ Pull request away, let's solve this thing!
Creating state is easy: Creating state is easy:
```clojure ```clojure
(defstate conn :start create-conn) (defstate conn :start (create-conn))
``` ```
where the `create-conn` function is defined elsewhere, can be right above it. where the `create-conn` function is defined elsewhere, can be right above it.
@ -99,7 +99,7 @@ where the `create-conn` function is defined elsewhere, can be right above it.
In case this state needs to be cleaned / destroyed between reloads, there is also `:stop` In case this state needs to be cleaned / destroyed between reloads, there is also `:stop`
```clojure ```clojure
(defstate conn :start create-conn (defstate conn :start (create-conn)
:stop (disconnect conn)) :stop (disconnect conn))
``` ```