An extractor returns: F1, F2, ..., Fi, opt[Seq[E] or E*]
A case matches: P1, P2, ..., Pj, opt[Seq[E]]
Put together: P1/F1, P2/F2, ... Pi/Fi, Pi+1/E, Pi+2/E, ... Pj/E, opt[Seq[E]]
Here Pm/Fi is the last pattern to match the fixed arity section.
productArity: the value of i, i.e. the number of non-sequence types in the extractor
nonStarArity: the value of j, i.e. the number of non-star patterns in the case definition
elementArity: j - i, i.e. the number of non-star patterns which must match sequence elements
starArity: 1 or 0 based on whether there is a star (sequence-absorbing) pattern
totalArity: nonStarArity + starArity, i.e. the number of patterns in the case definition
Note that productArity is a function only of the extractor, and
nonStar/star/totalArity are all functions of the patterns. The key
value for aligning and typing the patterns is elementArity, as it
is derived from both sets of information.
This member is added by an implicit conversion from PatternExpander[Pattern, Type] to
StringAdd[PatternExpander[Pattern, Type]] performed by method StringAdd in scala.Predef.
This member is added by an implicit conversion from PatternExpander[Pattern, Type] to
ArrowAssoc[PatternExpander[Pattern, Type]] performed by method ArrowAssoc in scala.Predef.
This member is added by an implicit conversion from PatternExpander[Pattern, Type] to
Ensuring[PatternExpander[Pattern, Type]] performed by method Ensuring in scala.Predef.
This member is added by an implicit conversion from PatternExpander[Pattern, Type] to
Ensuring[PatternExpander[Pattern, Type]] performed by method Ensuring in scala.Predef.
This member is added by an implicit conversion from PatternExpander[Pattern, Type] to
Ensuring[PatternExpander[Pattern, Type]] performed by method Ensuring in scala.Predef.
This member is added by an implicit conversion from PatternExpander[Pattern, Type] to
Ensuring[PatternExpander[Pattern, Type]] performed by method Ensuring in scala.Predef.
This member is added by an implicit conversion from PatternExpander[Pattern, Type] to
StringFormat[PatternExpander[Pattern, Type]] performed by method StringFormat in scala.Predef.
This member is added by an implicit conversion from PatternExpander[Pattern, Type] to
ArrowAssoc[PatternExpander[Pattern, Type]] performed by method ArrowAssoc in scala.Predef.
An extractor returns: F1, F2, ..., Fi, opt[Seq[E] or E*] A case matches: P1, P2, ..., Pj, opt[Seq[E]] Put together: P1/F1, P2/F2, ... Pi/Fi, Pi+1/E, Pi+2/E, ... Pj/E, opt[Seq[E]]
Here Pm/Fi is the last pattern to match the fixed arity section.
productArity: the value of i, i.e. the number of non-sequence types in the extractor nonStarArity: the value of j, i.e. the number of non-star patterns in the case definition elementArity: j - i, i.e. the number of non-star patterns which must match sequence elements starArity: 1 or 0 based on whether there is a star (sequence-absorbing) pattern totalArity: nonStarArity + starArity, i.e. the number of patterns in the case definition
Note that productArity is a function only of the extractor, and nonStar/star/totalArity are all functions of the patterns. The key value for aligning and typing the patterns is elementArity, as it is derived from both sets of information.