scala.meta.internal.fastparse.parsers.Combinators
The contents of a Sequence node, minus the left subtree.
The types here are all lies.
The types here are all lies. It's ok, just trust the code to do the right thing!
A ~ B ~ C ~ D ((A ~ B) ~ C) ~ D
Contains an optimized version of Sequence called Sequence.Flat that combines a tree of Sequence nodes from the left, into a single tail-recursive function working over a
Vector
of their contents.Intentionally completely type-unsafe internally, using casting all over the place, because it's near impossible to make the variable-length heterogenous-typed list type-safe without going crazy. If constructed by
flatten
-ing out a Sequence, the types are checked when the Sequence was constructed, so it's still safe.Appears to speed up the scalaparse.PerfTests benchmark by around 2.5x