Fuzion Logo
fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.

searchablelist

🌌searchablelist

searchablelist -- a list whose elements inherit from hasEquals

In contrast to searchableList, this uses choice type 'list' and not ref
type 'Sequence', so it is more efficient.

create a list from this searchablelist.

redefines Sequence.asList:
create a list from this Sequence.

A list is immutable, so it can be reused and shared between threads.
Compared to a stream, a list may require more (heap) allocation.

Default implementation uses asStream. Heirs must redefine at least
one of asList or asStream.

get the number of non-overlapping matches of l within this

get the number of matches of l

get the index of l within this list or nil if it does not exist

replace all occurances of f by r

does this list start with l?