Sign up for a GitHub account Sign in All Gists Hamcha / money.hs Created August 06, 2014 Code Revisions 1 /.sunken-menu-group /.sunken-menu-contents Embed HTTPS SSH You can clone with HTTPS or SSH . Download Gist /.only-with-full-nav Simple and explained Haskell app which does a very simple job: Count the minimum required coins to get a specific sum View money.hs money.hs Raw File suppressed. Click to show. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 -- If you have Haskell -> ghc money.hs && ./money module Main where -- We use Decimal because it provides us with decent floating point arithmetic. -- Using IEEE 754 (Float) math is bad ...