The core datastructure allowing easy manipulating of small and medium sized collections of elements.
It has a builtin syntax [] for empty list, x :: xs for creating list from head element and tail.
The core datastructure allowing easy manipulating of small and medium sized collections of elements.
It has a builtin syntax [] for empty list, x :: xs for creating list from head element and tail.
The core datastructure allowing easy manipulating of small and medium sized collections of elements.
It has a builtin syntax [] for empty list, x :: xs for creating list from head element and tail.
Returns list made from appending list y at end of list x. Original list are not modified. Works in time and memory O(length(x)).
Return [this] without first [n] elements. Works in time O(n) and constant memory. Throws ArgumentException when called on too short list.
List membership test, using the `Equals' method to compare objects.
Copies all elements from current list to specified array beginning with index 0
Copies first [len] elements from current list to specified array beginning with index 0
Returns a list without its last element and the list's last element
Returns 'true' if at least one of the 'l' list's elements satisfies the condition 'f'.
Example of use:
List.Exists (["a", "b", "abc", "d", "e"], fun (x) { x.Length > 2 })
evaluates to 'true' as there is one string of length 3 on the list.
Removes elements for which predicate is false
Returns the number of elements for which a predicate is true.
Finds the first elements for which a predicate is true.
This is an alias for ``Filter''
Finds the first elements for which a predicate is true.
Returns first n elements of the list. Works in time and memory O(n).
Returns 'true' if all of the 'l' list's elements satisfy the condition 'f'.
Example of use:
List.ForAll ([2, 4, 6, 8], fun (x) { x % 2 == 0 })
evaluates to 'true' as all the list's elements are even.
Creates enumerator for elements of list.
Partitions a list into two sublists according to a predicate.
Returns current list without elements equal to x. Equals method is used to compare elements.
Returns reversed list, i.e. Rev([1,2,3]) = [3,2,1]. Works in time and memory O(n).
Equivalent to Reverse().Append(y), but faster.
Returns reversed list, i.e. [1,2,3].Reverse().Equals ([3,2,1]). Works in time and memory O(n).
Removes elements for which predicate is false. The resulting list is reversed (operation is faster this way).
Return list, reversed or not, with elements not fulfilling [f] removed. Avoid allocation if possible.
Returns head (first element) of list. Given empty list throws System.ArgumentException.
Returns true if the given list is empty.
Returns last element of list. Given empty list throws InvalidArgument exception. Works in time O(n) and memory O(1).
Returns tail (all elements except the first one) of list.
The optional value variant.
The optional value variant.
Typesafe equality checks.
Typesafe equality checks.
Structural HashCode provider
Pretty prints the optional value.
Operations on optional values
Safe equality check
Returns `true' if the optional value is not present.
Checks if the optional value is present.
Same as ignore (Map (x, f)).
Safe optional value mapping.
Unwraps an optional value; throws an argument exception if the value is not present.
This namespace is always opened