aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/data/number.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/lux/data/number.lux')
-rw-r--r--stdlib/source/lux/data/number.lux12
1 files changed, 7 insertions, 5 deletions
diff --git a/stdlib/source/lux/data/number.lux b/stdlib/source/lux/data/number.lux
index 583a03b1f..2fc52ae41 100644
--- a/stdlib/source/lux/data/number.lux
+++ b/stdlib/source/lux/data/number.lux
@@ -12,7 +12,9 @@
[data
["." error (#+ Error)]
["." maybe]
- ["." text]]
+ ["." text]
+ [collection
+ ["." array]]]
["." math]]
[/
["." i64]])
@@ -750,15 +752,15 @@
(def: (make-digits _)
(-> Any Digits)
- ("lux array new" i64.width))
+ (array.new i64.width))
(def: (digits-get idx digits)
(-> Nat Digits Nat)
- (maybe.default 0 ("lux array get" digits idx)))
+ (|> digits (array.read idx) (maybe.default 0)))
-(def: (digits-put idx digit digits)
+(def: digits-put
(-> Nat Nat Digits Digits)
- ("lux array put" digits idx digit))
+ array.write)
(def: (prepend left right)
(-> Text Text Text)