Logo Mibo

FilterMapListNode<'T, 'U> Type

Maps every element of a list (or chooses/filters, when the mapping returns ValueNone to drop an element).

The output is the subsequence of input elements that survive the mapping. The node keeps the input position of every output element in a sorted array parallel to the output; the output position of an input element is the index of its stored input position (binary search). Inserts and removes shift the stored positions after the change point (tail fixup, O(k), same class as the output array's own memmove). An update on a non-surviving element that now passes the mapping inserts it into the output; an update on a surviving element that now fails removes it (FDA choose semantics, docs/ALIST-DESIGN.md §3.4).

Constructors

Constructor Description

FilterMapListNode(source, mapping)

Full Usage: FilterMapListNode(source, mapping)

Parameters:
Returns: FilterMapListNode<'T, 'U>
source : IAdaptiveList<'T>
mapping : int -> 'T -> 'U voption
Returns: FilterMapListNode<'T, 'U>

Type something to start searching.