Created
October 26, 2013 08:22
-
-
Save bitemyapp/7166725 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| ;; fuck yo JavaScript Numbers son | |
| (defn ends-in-0 [n] | |
| (contains? #{0.0 0} (mod n 1))) | |
| (defn maybe-int [n] | |
| (or (and (ends-in-0 n) (int n)) n)) | |
| (defmethod response | |
| :r-num | |
| [m] | |
| (maybe-int (:r-num m))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment