Base pattern for matching a repeated pattern.
The pattern can't match an empty list.
class repeat pattern[readonly value element type]
Declaration: repeat pattern
Announcements: repeat pattern
Direct supertypes: base pattern
All supertypes: validatable / value / entity / pattern / predicate / function / deeply_immutable data / debuggable / Object / stringable
pattern[element type] the pattern
Declaration: the pattern
Use: the pattern / the pattern / the pattern / the pattern / the pattern / the pattern / the pattern / the pattern / the pattern
Declaration: constructor
Declaration: validate
Direct overrides: validatable
Declaration: constructor
Direct overrides: function
Check whether the given list can be a start of the sequence that matches this pattern.
implement boolean is viable prefix(readonly list[element type] the list)
Declaration: is viable prefix
Direct overrides: pattern
Returns the maximum number of the elements of a given list that matches the pattern,
or null if there is no prefix match.
This is a greedy match: it mtaches the longest prefix.
implement nonnegative or null match prefix(readonly list[element type] the list)
Declaration: match prefix
Direct overrides: pattern
Gets the first non-empty match for this pattern.
implement range or null find first(readonly list[element type] the list, nonnegative start index)
Declaration: find first
Direct overrides: pattern