Created
August 15, 2012 21:49
-
-
Save 5outh/3364011 to your computer and use it in GitHub Desktop.
Fraction data type
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
data Fraction = Frac Integer Integer -- Numerator Denominator | |
instance Show Fraction where | |
show (Frac a b) = (show a) ++ " / " ++ (show b) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment