Skip to content

Instantly share code, notes, and snippets.

@alexpw
Created April 20, 2012 02:49
Show Gist options
  • Save alexpw/2425478 to your computer and use it in GitHub Desktop.
Save alexpw/2425478 to your computer and use it in GitHub Desktop.
user=> (defn foo [{:keys [x y] :or {x 10}}] (println "x:" x "y:" y))
#'user/foo
user=> (foo {:y 1})
x: 10 y: 1
nil
user=> (foo {:y 1 :x 2})
x: 2 y: 1
nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment