[Haskell] How does "do" know when to stop?
robdockins at fastmail.fm
Thu Feb 15 16:31:40 EST 2007
On Feb 15, 2007, at 4:15 PM, Rob Hoelz wrote:
> When I define a function and I use do to string functions together,
> does it know when my list of functions has come to an end? For
> foo = do
> bar = ...
> How does it know to stop at other_func?
> Rob Hoelz
'do' blocks are subject to the layout rule. See:
The short version is that it notices when a line is less indented,
and that ends the do block.
Speak softly and drive a Sherman tank.
Laugh hard; it's a long way to the bank.
More information about the Haskell