native_methods/list_methods
library
Classes
-
AddAll
-
Adds all elements from the provided list to the target list.
-
Any
-
Returns true if any element in the list satisfies the provided test function.
-
Clear
-
Clears the list.
-
Contains
-
Returns true if the list contains the provided element.
-
Every
-
Returns true if all elements in the list satisfy the provided test function.
-
Filter
-
Returns a new list containing only the elements that satisfy the provided test function.
-
Fold
-
Reduces the list to a single value by applying the provided function to each element.
-
ForEach
-
Iterates over the list elements and calls the provided function for each element.
The function should take one argument: element.
-
Head
-
Returns the first element of the list.
-
IndexOf
-
Returns the index of the first occurrence of the provided element in the list.
-
IsEmpty
-
Returns true if the list is empty.
-
IsNotEmpty
-
Returns true if the list is not empty.
-
Join
-
Joins the elements of the list into a string using the provided separator.
-
Length
-
Returns the number of elements in the list.
-
Map
-
Returns a new list containing the results of applying the provided function to each element.
-
RemoveAt
-
Removes the element at the specified index.
-
RemoveWhere
-
Removes all elements from the list that satisfy the provided test function.
-
Reversed
-
Returns a new list with the elements in reverse order.
-
Sort
-
Sorts the list using the provided comparison function.
-
Tail
-
Returns a new list containing all elements except the first.
-
ToString
-
Returns a string representation of the list.
Functions
-
registerListExtensions()
→ void
-
Registers all list extensions.
This is called automatically by the VM.