Scrapbook-0.4.0: code examples
Copyright© Frank Jung 2020
LicenseGPL-3
Safe HaskellSafe-Inferred
LanguageHaskell2010

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