| Copyright | © Frank Jung 2020 |
|---|---|
| License | GPL-3 |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Fractions
Description
Synopsis
Documentation
sumOfFractions :: Ratio Integer Source #
Add two fractions.
To try this in GHCi: > import Data.Ratio > let result = (28 % 50) + (26 % 50) > result 27 % 25
Or load this file and run: > sumOfFractions 27 % 25