Return a state-monad function that replaces the current state by s and
returns the previous state.
(defn set-state "Return a state-monad function that replaces the current state by s and returns the previous state." [s] (update-state (fn [_] s)))
Comments top
No comments for set-state. Log in to add a comment.