Project data in a collection using delegates, the same way select clause in a SQL database to fetch specific columns of a table.
new_array = Select(array, ::delegate);
Executes a provided function for each array element.
Foreach(players, ::heal);
Aggregate the result of multiple delegate.
result = Aggregate(initialValue, array, ::delegate);
Check if all items match the predicate.
isAll = All(array, ::predicate);
Reconstruct the array with only matches values from the predicate.
new_array = Where(array, ::predicate);
Check if atleast one item match the predicate.
isAny = Any(array, ::predicate);
Get the last item that match the predicate.
last = Last(array, ::predicate);
Get the first item that match the predicate.
first = First(array, ::predicate);
Count all items that match the predicate.
count = Count(array, ::predicate);
Get the smallest value from an array of int/float/string/vector.
min = Min(array);
Get the biggest value from an array of int/float/string/vector.
max = Max(array);
Reconstruct an array with all items casted to a specific type. Available types are: int, float, string.
strings = Cast(array, "string");
ints = Cast(array, "int");
Reconstruct the array with only the specified type. Available types are: int, float, string.
strings = OfType(array, "string");
ints = OfType(array, "int");
Sort all items from an array of int/float/string/vector.
new_array = Sort(array);
Get the average value from an array of int/float/vector.
average = Average(array);
Adds all values from an array of int/float/vector/string.
sum = Sum(array);
Reconstruct the array with a specified range.
new_array = Range(array, 3, 6);
Repeat all values in an array.
new_array = Repeat(array, 3);
Reverse the array.
new_array = Reverse(array);
Concat an array with another array.
new_array = Concat(arraySource, array);
Split an array into multiple chunks.
chunks = Chunk(array, 5);
Check if an array contains an element.
contains = Contains(array, 5);
Get the index of an element.
index = IndexOf(array, 10);
Remove an element from the array.
newArray = Remove(array, 10);
Remove an element from the array at a specific index.
newArray = RemoveAt(array, 1);