On Tuesday, August 19, 2014 4:49:59 AM UTC+8, Aaron Cohen wrote:
> You could save yourself a little nesting in your calls to swap! like so:
> 
> replace (swap! game (fn [g] (merge g {:running false, :game-over true}))))
> 
> with
> 
> (swap! game merge {:running false, :game-over true})))
> 
> Or an even more fun to think about one, replace:
> 
> (swap! game #(update-in % [:running] not)))
> 
> with
> 
> (swap! game update-in [:running] not))
 
Thanks Aaron, made the suggested changes.
 

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to