Skip to content

Instantly share code, notes, and snippets.

@ponkore
Created March 15, 2012 00:29
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 ponkore/2040698 to your computer and use it in GitHub Desktop.
Save ponkore/2040698 to your computer and use it in GitHub Desktop.
Lexical Scope _and_ Dynamic Scope (Clojure version)
user=> (def x 7)
#'user/x
user=> (defn g [] x)
#'user/g
user=> (defn f [] (let [x 9] (g)))
#'user/f
user=> (f)
7
user=>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment