Skip to content

Instantly share code, notes, and snippets.

@philipnilsson
Created May 7, 2017 18:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save philipnilsson/f06f052fbea28a4f7e6b3cd3f8a07377 to your computer and use it in GitHub Desktop.
Save philipnilsson/f06f052fbea28a4f7e6b3cd3f8a07377 to your computer and use it in GitHub Desktop.
-- Run a stateful computation and on completion
-- restore state to it's current value.
excursion st = do
oldState <- get
st
put oldState
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment