Skip to content

Instantly share code, notes, and snippets.

@darwin
Last active August 9, 2016 16:11
Show Gist options
  • Select an option

  • Save darwin/1e31b0c33f1ca0e6e0e475b51f95b424 to your computer and use it in GitHub Desktop.

Select an option

Save darwin/1e31b0c33f1ca0e6e0e475b51f95b424 to your computer and use it in GitHub Desktop.
(ns zones.test
(:require [zones.core :as zones :include-macros true]))
(println "before:" (zones/get v))
(zones/binding [v "I'm a dynamically bound value in the default zone"]
(println "inside:" (zones/get v))
(js/setTimeout (zones/bound-fn [] (println "in async call:" (zones/get v))) 500))
(println "after:" (zones/get v))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment