On 10/17/08 07:39, Larry Evans wrote:
The attached code produces error:
<-- cut here --
[snip]
{-
Purpose:
Explore how to mix 'assignments' inside do.
Motivation:
Instead of:
let
{ v0 = e0
; v1 = e1
}
in do
{ print v0
; print v1
}
which is hard to read, recode above as:
do
{ v0 = e0
; print v0
; v1 = e1
; print v1
}
which is easier to read and more intuitive for
c++ programmers.
Example_code_suggesting_should_work:
http://www.nabble.com/List-as-input-p19987726.html
-}
module Main where
import Data.List
main = do
{ v0 <- [999]
; putStr "v0="
; print v0
}
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe