Created
August 14, 2013 04:02
-
-
Save jebberjeb/6227905 to your computer and use it in GitHub Desktop.
condp w/ get-in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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