[Haskell] How does "do" know when to stop?
ndmitchell at gmail.com
Thu Feb 15 16:21:19 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?
Simple answer: the identation.
Long answer: read the Haskell 98 report specifically the bits on the
layout rule. Usually just remembering that indentation is significant
is enough for everything to "just work"
More information about the Haskell