[Haskell-cafe] seq - RTFM?
Piotr Kalinowski
pitkali at gmail.com
Fri Jul 21 08:18:49 EDT 2006
On 21/07/06, Dusan Kolar <kolar at fit.vutbr.cz> wrote:
> 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
Well, I understand that seq evaluates the first argument. But the
result of evaluating putStr is a monadic action. Not execution of that
action.
Regards,
Piotr Kalinowski
--
Intelligence is like a river: the deeper it is, the less noise it makes
More information about the Haskell-Cafe
mailing list