Array¶
A few utility functions which can operate on Arrays. Purposefully light.
Library API¶
Array.Flatten¶
a1 Array.Flatten(array a1)
Takes in an array, a1, which may have arrays inside of it. Unpacks all arrays in their proper place into a1. Returns a1.
Example
Array.Flatten{{1, 2}, 3, 4, {5, {6, {{7, 8}, 9}, 10}, 11}, {}, 12} --> {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}
Array.Contains¶
number Array.Contains(array a1, variant v)
Returns the index at which v exists within array a1.
Example
print(Array.Contains({0, 1, 2}, 2)) --> 3 print(Array.Contains({0, 1, 2}, 4)) --> nil