Skip to content

Instantly share code, notes, and snippets.

@l1x
Created May 15, 2014 03:52
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 l1x/596baf96f000299f30db to your computer and use it in GitHub Desktop.
Save l1x/596baf96f000299f30db to your computer and use it in GitHub Desktop.
shovel.core=> (def pending (atom 0))
#'shovel.core/pending
shovel.core=> (inc @pending)
1
shovel.core=> (inc @pending)
1
shovel.core=> (inc @pending)
1
shovel.core=> (swap! pending inc)
1
shovel.core=> (swap! pending inc)
2
shovel.core=> (swap! pending inc)
3
shovel.core=> @pending
3
shovel.core=>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment