Re:How to interpret complex C/C++ declarations (2004)
by bjz_ on Thursday August 01, 2013 @03:16AM
(#6139075)
What does the tildes do in `(~[~[~[~[A, B], C], D], E])`?
[ Parent
| on HN ]
Re:How to interpret complex C/C++ declarations (2004)
by terhechte on Thursday August 01, 2013 @03:56AM
(#6139146)
It's a wrapper over a sequence of matches:
http://www.scala-lang.org/api/current/#scala.util.parsing.co...
Given p1: Parser[A] and p2: Parser[B], a parser composed with p1 ~ p2 will have type Parser[~[A, B]]. The successful result of the parser can be extracted from this case class.
In this case it will use the [[[[A,B] C] D] E] sequence to compose A,B,C,D,E together in order to produce F (A-F are types). At least if I understand things correctly, I've never used flatten5.