Created
July 26, 2011 07:54
-
-
Save fronx/1106227 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
| (defn $ | |
| "Amount of money in USD" | |
| ([x] ($ x 0)) | |
| ([x y] (+ x (/ y 100)))) | |
| (defn € | |
| "Amount of money in EUR" | |
| ([x] (€ x 0)) | |
| ([x y] ($ (€-to-$ x) y))) | |
| (defn €-to-$ | |
| "Returns the USD equivalent of an amount in EUR" | |
| ([x] ($ x 45))) | |
| (€ 4 30) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment