Core Help Root: Objects: List Library: Maps


.make(n[,elt])
Makes a list of n copies of elt. Elt defaults to 0.
.mmap(list, method, args...)
Calls method on each element (with additional arguments, if specified), returns the results.
.mfilter(list, method, args...)
Similar to .mmap(), but returns the list of objects for which method returned a true value.
.lmap(list, method, args...)
Calls sender().method on each element of the list, returns the results.
.omap(list, object, method, args...)
Calls object.method on each element.
.map_to_english(list, method, args...)
.map_to_string(list, method, args...)
Shorthand for .mmap() followed with .to_english()/.to_string().
.element_maxlength(list)
Finds the longest element (measuring by string representation).
.nth_element_maxlength(list, n)
Same as list.slice(n).element_maxlength().
.reverse(list)
Reverse the order of the elements of the list.
.compress(list)
Removes the repeated elements.
.slice(list, n)
Returns the list of nth elements from a list of lists. If n is a list, it will return a list of lists.
.numbered_text(text)
Returns the text with line numbers prepended.
.max(list)
.min(list)
Returns minimal/maximal element of the list (0 if empty).
.fold(list, object, method, args...)
Fold operation from functional programming. For an empty list, it returns 0, for a 1 element list, it returns the first element. Otherwise, it calls the method for the first two elements, then calls it with the result and the third element, etc. It returns the last result.
.valid_objects(list)
Removes invalid objects from the list
.grep(list,regexp)
For each line that matches regexp, returns [linenumber, regexp match regions, the line text].
.count(list, elem)
Counts the number of occurences of element in the list.
.locate(list, value)
Returns the list of indices into the list where the value of the element is equivalent to the value of value.
[4, 2, 3, 4].locate(4) -> [1, 4]


Element | Formatting | Maps | Sets | Other


the Cold Dark