[Haskell-cafe] seq - RTFM?
Dusan Kolar
kolar at fit.vutbr.cz
Fri Jul 21 08:13:01 EDT 2006
Hello all,
my question is probably dull. So answers to better investigate manual
are welcome. Why is this correct?
___ ___ _
/ _ \ /\ /\/ __(_)
/ /_\// /_/ / / | | GHC Interactive, version 6.4.1, for Haskell 98.
/ /_\\/ __ / /___| | http://www.haskell.org/ghc/
\____/\/ /_/\____/|_| Type :? for help.
Loading package base-1.0 ... linking ... done.
Prelude> putStr "Ahoj\n"
Ahoj
Prelude> putStr "Ahoj\n" `seq` 3+3
6
Prelude> :q
Leaving GHCi.
And not
Prelude> putStr "Ahoj\n"
Ahoj
Prelude> putStr "Ahoj\n" `seq` 3+3
Ahoj
6
???
Does it have something common with monads or is it a behavior of seq?
Thanks,
Dusan
More information about the Haskell-Cafe
mailing list