On Mon, Oct 19, 2009 at 1:44 PM, zaxis <z_a...@163.com> wrote:
> oh! thanks!  But why ?

A let can introduce multiple declarations.

So this

foo = do
  let x = 3
  let y = 4
  return $ x+ y

can also be written like

foo = do
  let x = 3
      y = 4 -- no let
  return $ x + y

With explicit blocks:

foo = do {
  let {x = 3; y = 4;};
  return $ x + y;
}
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to