ListDecorator
Implements filterConserve, zipWithConserve methods on lists that avoid duplication of list nodes where feasible.
Value members
Concrete methods
Like xs filter p but returns list xs itself - instead of a copy -
if p is true for all elements.
Like xs filter p but returns list xs itself - instead of a copy -
if p is true for all elements.
True if two lists have the same length. Since calling length on linear sequences is Θ(n), it is an inadvisable way to test length equality. This method is Θ(n min m).
True if two lists have the same length. Since calling length on linear sequences is Θ(n), it is an inadvisable way to test length equality. This method is Θ(n min m).
Like xs.lazyZip(xs.indices).map(f), but returns list xs itself
Like xs.lazyZip(xs.indices).map(f), but returns list xs itself
- instead of a copy - if function
fmaps all elements ofxsto themselves.