andrewcoppin at btinternet.com
Sun Oct 14 05:13:54 EDT 2007
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?
More information about the Haskell-Cafe