[Haskell-beginners] Equivalent of IO Monad in other functional languages?

Sumit Sahrawat, Maths & Computing, IIT (BHU) sumit.sahrawat.apm13 at iitbhu.ac.in
Mon Mar 16 14:24:41 UTC 2015


Hi Heinrich,

Thanks for confirming my concepts. It took me a long time pondering over
what it meant to be purely functional.
Great articles btw (+1).

On 16 March 2015 at 19:41, Heinrich Apfelmus <apfelmus at quantentunnel.de>
wrote:

> Karl Voelker wrote:
>
>> On Sun, Mar 15, 2015, at 09:17 AM, Simon Kitching wrote:
>>
>>> And AIUI the Haskell compiler/runtime can postpone evaluation of any
>>> function (laziness), or reorder function calls whever it thinks this good.
>>>
>>
>> It's not that it "can" but that it must. Haskell's evaluation strategy
>> is a part of the language specification.
>>
>> Consider this expression:
>>
>> let f = 1 : f in take 5 f
>>
>> You can paste this into ghci and feel confident that it's going to
>> terminate. You're not at the whim of the runtime.
>>
>> I think you may find these articles interesting:
>>
>> https://wiki.haskell.org/Lazy_evaluation
>> https://wiki.haskell.org/Non-strict_semantics
>>
>
> Strictly speaking, the Haskell language standard only specifies that
> Haskell has non-strict semantics, not that it needs to be evaluated using
> lazy evaluation.
>
> Of course, the two are related. I have tried to expand on the details here:
>
>   https://hackhands.com/non-strict-semantics-haskell
>
>
> Best regards,
> Heinrich Apfelmus
>
> --
> http://apfelmus.nfshost.com
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>



-- 
Regards

Sumit Sahrawat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20150316/7330894c/attachment.html>


More information about the Beginners mailing list