Matcher for one of a collection of patterns.
class option matcher[readonly value element type, covariant any value result type]
extends option pattern[element type]
implements matcher[element type, result type]
Parse the list and produce a result. Assumes this pattern matches the list.
implement result type or null parse(readonly list[element type] the list)
for (option : options)
if option(the list)
if option is matcher
return the matcherparse(the list) !> result type
else
return missinginstance
utilitiespanic("Can't parse list in option_matcher")