Navigation
|
Synopsis Library functions for lists.
Description For operators on lists see Values/List.
The following functions are available for lists:
- delete: Delete an element from a list.
- distribution: Get the distribution of the elements of the list. That is how often does each element occur in the list?
- drop: Drop elements from the head of a list.
- dup: Remove multiple occurrences of elements in a list. The first occurrence remains.
- getOneFrom: Pick a random element from a list.
- head: Get the first element(s) from a list.
- headTail: Split a list in a head and a tail.
- index: A list of legal index values of a list.
- indexOf: Index of first occurrence of an element in a list.
- insertAt: Insert an element at a specific position in a list.
- intercalate: Join a list of values into a string separated by a separator.
- isEmpty: Test whether a list is empty.
- itoString: Convert a list to an indented string.
- last: Return the last element of a list, if any.
- lastIndexOf: Return index of last occurrence of elt in lst, or -1 if elt is not found.
- mapper: Apply a function to all list elements and return list of results.
- max: Determine the largest element in a list.
- merge: Merge the elements of two sorted lists into one list.
- min: Determine the smallest element in a list.
- mix: Mix the elements of two lists.
- permutations: Compute all permutations of a list.
- pop: Pop top element from list, return a tuple.
- prefix: Return all but the last element of a list.
- push: Push an element in front of a list.
- reducer: Apply a function to successive elements of list and combine the results (deprecated).
- reverse: Reverse a list.
- size: Determine the number of elements in a list.
- slice: Compute a sublist of a list.
- sort: Sort the elements of a list.
- split: Split a list into two halves.
- sum: Sum the elements of a list.
- tail: Get the tail element(s) from a list.
- take: Get number of elements from the head of a list.
- takeOneFrom: Remove an arbitrary element from a list, returns the element and the modified list.
- takeWhile: Take elements from the front of the list as long as a predicate is true.
- toMap: Convert a list of pairs to a map; first elements are associated with a set of second elements.
- toMapUnique: Convert a list of tuples to a map; result must be a map.
- top: Take the top element of a list.
- toRel: Convert a list to a relation.
- toSet: Convert a list to a set.
- toString: Convert a list to a string.
- unzip: Make a pair (triple) of lists from a list of pairs (triples).
- upTill: Returns the list 0,1..n-1.
- zip: Make a list of pairs from two (three) lists of the same length.
|