diff options
Diffstat (limited to 'stdlib/source/lux/data/coll/array.lux')
-rw-r--r-- | stdlib/source/lux/data/coll/array.lux | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/stdlib/source/lux/data/coll/array.lux b/stdlib/source/lux/data/coll/array.lux index 00f4173e0..855c35d8e 100644 --- a/stdlib/source/lux/data/coll/array.lux +++ b/stdlib/source/lux/data/coll/array.lux @@ -37,7 +37,7 @@ (Array a))) (if (n/= +0 length) dest-array - (list/fold (function [offset target] + (list/fold (function (_ offset target) (case (read (n/+ offset src-start) src-array) #.None target @@ -50,7 +50,7 @@ (def: #export (occupied array) {#.doc "Finds out how many cells in an array are occupied."} (All [a] (-> (Array a) Nat)) - (list/fold (function [idx count] + (list/fold (function (_ idx count) (case (read idx array) #.None count @@ -68,7 +68,7 @@ (def: #export (filter p xs) (All [a] (-> (-> a Bool) (Array a) (Array a))) - (list/fold (function [idx xs'] + (list/fold (function (_ idx xs') (case (read idx xs) #.None xs' @@ -116,7 +116,7 @@ (def: #export (clone xs) (All [a] (-> (Array a) (Array a))) (let [arr-size (size xs)] - (list/fold (function [idx ys] + (list/fold (function (_ idx ys) (case (read idx xs) #.None ys @@ -128,7 +128,7 @@ (def: #export (from-list xs) (All [a] (-> (List a) (Array a))) - (product.right (list/fold (function [x [idx arr]] + (product.right (list/fold (function (_ x [idx arr]) [(n/inc idx) (write idx x arr)]) [+0 (new (list.size xs))] xs))) @@ -155,7 +155,7 @@ (let [sxs (size xs) sxy (size ys)] (and (n/= sxy sxs) - (list/fold (function [idx prev] + (list/fold (function (_ idx prev) (and prev (case [(read idx xs) (read idx ys)] [#.None #.None] @@ -186,7 +186,7 @@ (let [arr-size (size ma)] (if (n/= +0 arr-size) (new arr-size) - (list/fold (function [idx mb] + (list/fold (function (_ idx mb) (case (read idx ma) #.None mb |