diff options
Diffstat (limited to 'stdlib/source/lux/data/collection/array.lux')
-rw-r--r-- | stdlib/source/lux/data/collection/array.lux | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/stdlib/source/lux/data/collection/array.lux b/stdlib/source/lux/data/collection/array.lux index 09fe50412..f19ad6547 100644 --- a/stdlib/source/lux/data/collection/array.lux +++ b/stdlib/source/lux/data/collection/array.lux @@ -62,7 +62,7 @@ (#.Some value) (write (n/+ offset dest-start) value target))) dest-array - (list.n/range 0 (dec length))))) + (list.indices length)))) (def: #export (occupied array) {#.doc "Finds out how many cells in an array are occupied."} @@ -82,7 +82,7 @@ (All [a] (-> (Array a) Nat)) (n/- (occupied array) (size array))) -(def: #export (filter p xs) +(def: #export (filter! p xs) (All [a] (-> (-> a Bit) (Array a) (Array a))) (list/fold (function (_ idx xs') @@ -184,7 +184,7 @@ _ #0))) #1 - (list.n/range 0 (dec sxs))))) + (list.indices sxs)))) )) (structure: #export Monoid<Array> (All [a] (Monoid (Array a))) @@ -210,7 +210,7 @@ (#.Some x) (write idx (f x) mb))) (new arr-size) - (list.n/range 0 (dec arr-size))) + (list.indices arr-size)) )))) (structure: #export _ (Fold Array) |