Created
April 15, 2011 11:38
-
-
Save borkdude/921568 to your computer and use it in GitHub Desktop.
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
(defn guard [pred & args] | |
(if (apply pred args) args nil)) | |
(def guard-> (partial guard >)) | |
(guard-> 6 5) ; => (6 5) | |
(guard-> 5 6) ; => nil |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment