Is there any way to efficiently do this, perhaps through toBuffer or to methods? My real problem is I'm building a List off a parser, as follows:
lazy val nodes: Parser[List[Node]] = phrase(( nodeA | nodeB | nodeC).*)
But after building it, I want it to be a buffer instead - I'm just not sure how to build a buffer straight from the parser.
toBuffer
is not sufficiently performant? – FlooringListBuffer
, not just anyBuffer
as returned bytoBuffer
– Kumar