Skip to content

Instantly share code, notes, and snippets.

@sundarj
Created September 23, 2017 19:43
Show Gist options
  • Save sundarj/0fa06525c1447b6f823ee086167c4176 to your computer and use it in GitHub Desktop.
Save sundarj/0fa06525c1447b6f823ee086167c4176 to your computer and use it in GitHub Desktop.
boot.user=> (defn define-piece [{:keys [x-fn y-fn max] :or {x-fn identity, y-fn identity}}]
#_=> {:fn (fn [[x y]] [(x-fn x) (y-fn y)]) :max max})
#'boot.user/define-piece
boot.user=> ((:fn (define-piece {:x-fn inc})) [1 2])
[2 2]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment