Here is what I am trying to do:
def parser = parser_a >> {
case a => val c = compute(a) ; parser_b(c)
} ^^ {
case a ~ b => (a, b)
}
Of course it won't work, since the function after the ^^ operator only gets the result of parser_b. How can I keep the result of parser_a?