Unavailable. Nobody can download this version any more, with elm or with the Lamdera compiler: github.com/ljuglaret/Fraction exists but has no tag 2.0.2; Software Heritage has not archived the repo; no fork with tag 2.0.2 found (57 same-name repos checked); no cached copy. Use another version.
Allows manipulation of fractions : simplify, add two fractions, create a fraction, access the numerator and denominator.
f1 : Maybe Fraction
f1 = createFraction(17,15)
-- Just (Fraction { denominator = 15, numerator = 17 })
f2 : Maybe Fraction
f2 = createFraction(17,0)
-- Nothing : Maybe Fractions : Maybe Fraction
s = f1 |> (Maybe.andThen (\m ->
f2 |> (Maybe.andThen (\m2 ->
Just (simplify (addition m m2))))))a = f1 |> (Maybe.andThen (\m -> Just (getNumerator m)))
b = f1 |> (Maybe.andThen (\m -> Just (getdenominator m)))
-- a = Just 17
-- b = Just 15