diff options
Diffstat (limited to 'stdlib/source/library/lux/math/number.lux')
-rw-r--r-- | stdlib/source/library/lux/math/number.lux | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/stdlib/source/library/lux/math/number.lux b/stdlib/source/library/lux/math/number.lux index 8e1233bf3..b31167dc9 100644 --- a/stdlib/source/library/lux/math/number.lux +++ b/stdlib/source/library/lux/math/number.lux @@ -21,7 +21,7 @@ (def (separator_prefixed? number) (-> Text Bit) - (case ("lux text index" 0 ..separator number) + (when ("lux text index" 0 ..separator number) {.#Some 0} true @@ -35,12 +35,12 @@ (with_template [<macro> <nat> <int> <rev> <frac> <error>] [(def .public <macro> (macro (_ tokens state) - (case tokens + (when tokens {.#Item [meta {.#Text repr'}] {.#End}} (if (..separator_prefixed? repr') {try.#Failure <error>} (let [repr (..without_separators repr')] - (case (at <nat> decoded repr) + (when (at <nat> decoded repr) {try.#Success value} {try.#Success [state (list [meta {.#Nat value}])]} |