Skip to content

Instantly share code, notes, and snippets.

@mks-m
Created July 25, 2015 16:08
Show Gist options
  • Save mks-m/0aebb5f346ad3147a33e to your computer and use it in GitHub Desktop.
Save mks-m/0aebb5f346ad3147a33e to your computer and use it in GitHub Desktop.
(defn baz [a] a)
; this does something and then returns anonymous function, closure is important
(defn bar [] (let [a b] #(do (baz a) )))
; this gets anonymous function as input and calls it
(defn foo [arg] (arg))
(foo (bar))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment