Skip to content

Instantly share code, notes, and snippets.

@raskchanky
Created March 15, 2014 03:29
Show Gist options
  • Save raskchanky/9561465 to your computer and use it in GitHub Desktop.
Save raskchanky/9561465 to your computer and use it in GitHub Desktop.
Different Clojure styles
(defn hamming-distance [a b]
(->>
(map #(= %1 %2) a b)
(filter false?)
count))
(defn hamming-distance [a b]
(count
(filter false?
(map #(= %1 %2) a b))))
@tristanoneil
Copy link

Don't really read or write a ton of Clojure but personally version 2 is easier for me to follow.

@raskchanky
Copy link
Author

@puredanger Awesome, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment