Optional.match

Tuple!(bool, Pattern[], Pattern[]) match(Pattern[] left, Pattern[] collected = null)

Attempts to match children, but always succeeds.

Parameters

leftThe remaining arguments to match.
collectedPreviously collected/matched patterns.

Returns

A tuple of (true, remaining_args, collected_patterns).