diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/library/lux/math/number/ratio.lux | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/stdlib/source/library/lux/math/number/ratio.lux b/stdlib/source/library/lux/math/number/ratio.lux index b81667def..2974eae8b 100644 --- a/stdlib/source/library/lux/math/number/ratio.lux +++ b/stdlib/source/library/lux/math/number/ratio.lux @@ -30,7 +30,7 @@ (def .public (nat value) (-> Ratio (Maybe Nat)) - (case (the #denominator value) + (when (the #denominator value) 1 {.#Some (the #numerator value)} _ {.#None})) @@ -139,7 +139,7 @@ ..separator (n#encoded _#denominator))) (def (decoded input) - (case (text.split_by ..separator input) + (when (text.split_by ..separator input) {.#Some [num denom]} (do try.monad [numerator (n#decoded num) |