Знай и люби монаду IO
Apr. 15th, 2012 03:57 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Устно вычислите значения побочные эффекты выражений и проверьте результат в GHCi:
let x = print "first" in print "second" let x = print "first" in x >> print "second" (\x -> print "first") (print "second") print "first" `seq` print "second"(Значения тоже можете вычислить в качестве бонуса:)
no subject
Date: 2012-04-15 12:00 pm (UTC)no subject
Date: 2012-04-15 12:22 pm (UTC)no subject
Date: 2012-04-15 12:28 pm (UTC)no subject
Date: 2012-04-15 01:14 pm (UTC)Для полноты картины нужны ещё примеры с unsafePerformIO