[Haskell] How does "do" know when to stop?

Rob Hoelz hoelz at wisc.edu
Thu Feb 15 16:15:27 EST 2007


When I define a function and I use do to string functions together, how
does it know when my list of functions has come to an end?  For example:

foo = do
    bar
    baz
    other_func
bar = ...

How does it know to stop at other_func?

Thanks,
Rob Hoelz


More information about the Haskell mailing list