Nemerle Documentation

List Members

List overview

Public Static Methods

Append 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)).
Assoc  
Combineb  
Concat Makes list one level more flat, i.e. Concat([[1;2];[3;4]]) = [1;2;3;4]. Does not work deeper, i.e. Concat([[[1;2];[3]];[[4]]]) = [[1;2];[3];[4]].
Contains List membership test, using the `Equals' method to compare objects.
ContainsRef List membership test, using the reference equality.
Copy  
DivideLast Returns a list without its last element and the list's last element
Equals Overloaded. Tests equality of two lists. Uses Equal method of objects to test wether they are the same.
Exists Returns 'true' if at least one of the 'l' list's elements satisfies the condition 'f'.
Exists2  
Filter Removes elements for which predicate is false
FilteredLength Returns the number of elements for which a predicate is true.
Find Finds the first elements for which a predicate is true.
FindAll This is an alias for ``Filter''
Flatten Alias for Concat(l).
FoldLeft  
FoldLeft2  
FoldRight  
FoldRight2  
ForAll Returns 'true' if all of the 'l' list's elements satisfy the condition 'f'.
ForAll2  
FromArray Converts an array into a list.
Group Groups equal element into lists
Hd Alias for Head(l).
Head Returns head (first element) of list. Given empty list throws System.ArgumentException.
IsEmpty Returns true if the given list is empty.
Iter  
Iter2  
Last Returns last element of list. Given empty list throws InvalidArgument exception. Works in time O(n) and memory O(1).
Length Returns length of given list. Time O(n), Mem O(1).
Map  
Map2  
MapFromArray  
MemAssoc  
Member List membership test, using the `Equals' method to compare objects.
Nth Returns n-th element of list, where 0-th is head. Throws InvalidArgument exception when given too short list. Works in time O(n) and memory O(1).
Partition Partitions a list into two sublists according to a predicate.
Product Returns a product of lists stored in list [list]. Elements of result are lists of the same length = List.Length (list).
Remove Returns list l without elements equal to x.
RemoveAssoc  
Rev Returns reversed list, i.e. Rev([1;2;3]) = [3;2;1]. Works in time and memory O(n).
RevAppend Equivalent to Append(Rev(x),y).
RevFilter Removes elements for which predicate is false. The resulting list is reversed (operation is faster this way).
RevMap  
RevMap2  
Singletons  
SizeSubsets Return list of all possible [n]-element subsets of set [list].
Sort  
Split  
SubsetsPartitions Return a list of all possible partitions of [set] into [count] subsets.
Tail Returns tail (all elements except first one) of list.
Tl Alias for Tail(l).

Public Instance Methods

Equals (inherited from Object) Overloaded.  
GetHashCode (inherited from Object)  
GetType (inherited from Object)  
ToString (inherited from Object)  

Protected Instance Methods

Finalize (inherited from Object)  
MemberwiseClone (inherited from Object)  

See Also

List Class | Nemerle.Collections Namespace