class List<T>
Available on all platforms
A linked-list of elements. The list is composed of two-elements arrays that are chained together. It is optimized so that adding or removing an element does not imply copying the whole array content every time.
Instance Fields
Empties this List.
This function does not traverse the elements, but simply sets the
internal references to null and this.length to 0.
function filter(f:T ->Bool):List<T>
Returns a list filtered with f. The returned list will contain all
elements for which f(x) == true.
Returns the first element of this List, or null if no elements exist.
This function does not modify this List.
function join(sep:String):String
Returns a string representation of this List, with sep separating
each element.
Returns the last element of this List, or null if no elements exist.
This function does not modify this List.
function map<X>(f:T ->X):List<X>
Returns a new list where all elements have been converted by the
function f.
Returns the first element of this List, or null if no elements exist.
The element is removed from this List.
Adds element item at the beginning of this List.
this.length increases by 1.