
14 Oct
2007
14 Oct
'07
9:13 a.m.
PR Stanley wrote:
Thanks for the very clear explanation. More questions: What is the role of ">>"? How is ">>" different to ">>="? I am aware that ">>=" is used for sequencing parsers but that's all I know about it. Thanks, Paul
foo >>= bar executes the action "foo" and passes its result to the function "bar" (which must then return another action, which is executed). foo >> bar executes the action "too", and then executes the action "bar". Any result generated by "foo" is discarded, and "bar" must be an action rather than a 1-argument function that *returns* an action. Make any sense?