Skip to content

Instantly share code, notes, and snippets.

@davidsantiago
Created March 16, 2012 06:26
Show Gist options
  • Save davidsantiago/2048777 to your computer and use it in GitHub Desktop.
Save davidsantiago/2048777 to your computer and use it in GitHub Desktop.
(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