Skip to content

Instantly share code, notes, and snippets.

@jebberjeb
Created August 14, 2013 04:02
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 jebberjeb/6227905 to your computer and use it in GitHub Desktop.
Save jebberjeb/6227905 to your computer and use it in GitHub Desktop.
condp w/ get-in
(let [foo {:Error "an error"}
baz {:Info {:RowsUpdated "some info"}}]
(condp #(get-in %2 %1) baz
[:Info :RowsUpdated] :>> (fn [msg] {:msg msg})
[:Error] :>> (fn [msg] {:msg msg})))
#_(pred test-expr expr)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment