diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/data/collection/array.lux | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/stdlib/source/lux/data/collection/array.lux b/stdlib/source/lux/data/collection/array.lux index bb19af564..0b2911c3e 100644 --- a/stdlib/source/lux/data/collection/array.lux +++ b/stdlib/source/lux/data/collection/array.lux @@ -16,7 +16,8 @@ [number ["n" nat]]]]) -(def: #export type_name "#Array") +(def: #export type_name + "#Array") (type: #export (Array a) {#.doc "Mutable arrays."} @@ -28,7 +29,7 @@ (for {@.jvm (template: (!int value) (|> value - (:coerce <index_type>) + (:as <index_type>) "jvm object cast" "jvm conversion long-to-int"))} (as_is)) @@ -59,12 +60,12 @@ @.jvm (|> array - (:coerce <array_type>) + (:as <array_type>) "jvm array length object" "jvm conversion int-to-long" "jvm object cast" (: <index_type>) - (:coerce Nat)) + (:as Nat)) @.js ("js array length" array) @.python ("python array length" array) @@ -91,7 +92,7 @@ @.jvm (let [value (|> array - (:coerce <array_type>) + (:as <array_type>) ("jvm array read object" (!int index)))] (if ("jvm object null?" value) #.None @@ -113,8 +114,8 @@ @.jvm (|> array - (:coerce <array_type>) - ("jvm array write object" (!int index) (:coerce <elem_type> value)) + (:as <array_type>) + ("jvm array write object" (!int index) (:as <elem_type> value)) :assume) @.js ("js array write" index value array) |