From ef4dee6c8a3dd4bcfab72bec61835c8c867b2d24 Mon Sep 17 00:00:00 2001 From: Dan Kee Date: Mon, 29 Feb 2016 09:18:02 -0600 Subject: [PATCH] Make `:start` value a function call. In the existing example, `(defstate conn :start create-conn)` simply binds `conn` to the function `create-conn`, rather than the result of calling the function. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 47f3ac1..534e636 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ Pull request away, let's solve this thing! Creating state is easy: ```clojure -(defstate conn :start create-conn) +(defstate conn :start (create-conn)) ``` 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` ```clojure -(defstate conn :start create-conn +(defstate conn :start (create-conn) :stop (disconnect conn)) ```