Created
March 16, 2012 06:26
-
-
Save davidsantiago/2048777 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 universal-reducer | |
"A function that can be used to reduce any function output." | |
[a b] | |
(let [a (if (nil? a) 0 a) | |
b (if (nil? b) 0 b)] | |
(+ (.hashCode a) (.hashCode b)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment