Skip to content

Instantly share code, notes, and snippets.

@6ewis
Created April 3, 2016 19:15
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 6ewis/dcd71252a1277ed8d7b94e391a04d124 to your computer and use it in GitHub Desktop.
Save 6ewis/dcd71252a1277ed8d7b94e391a04d124 to your computer and use it in GitHub Desktop.
(let [n 2] (future (dotimes [_ n] (swap! counter inc-print)))
(future (dotimes [_ n] (swap! counter inc-print)))
(future (dotimes [_ n] (swap! counter inc-print))))
;;
0;;
1;;
2;;
2;;
3;;
4;;
5
@counter;; -> 6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment