Arrays
The following code examples demonstrate the built-in array type offered by the language. See section [TBD] for details.
Type Declaration
Unsized Array Name: {Int**}.Sized Array Name: {Int*10*}.Sized Array Name: {Int[-1]*10*}. `Array with 10 elements, with -1 as default value.`Accessing
Containment
some array: {String**} ["b", "c", "d"];
some array ("a"?) = false `The value "a" is not in the array.`
some array ("b"?) = true `The value "b" is in the array.`some array: {String**} ["b", "c", "d"];
some array ("a"?, "b"?) = {false, true} `Whether each value is in the array.`some array: {String**} ["b", "c", "d"];
some array (0 ? "a") = "b" `Provide the value at index 0, or default to "a".`
some array (3 ? "a") = "a"some array: {String**} ["b", "c", "d"];
some array (0 ? "a", 3 ? "a") = {"b", "a"}some array: {String**} ["b", "c", "d"];
some array ({"a", "b"}?) = {false, true} `Check for the values from the tuple.`Retrieving
Setting
Operators
Count
Difference (Remove Elements)
Equality
Setup
Approximate
Collective
Strict
Intersection
Union (Appending)
Last updated