[Haskell-cafe] Monadic function purity

Miguel Mitrofanov miguelimo38 at yandex.ru
Wed Nov 24 16:06:01 EST 2010


Generally speaking, all Haskell functions are pure unless they use unsafe- functions or FFI inside.

Отправлено с iPhone

Nov 24, 2010, в 23:46, Gregory Propf <gregorypropf at yahoo.com> написал(а):

> I have a pretty basic question.  I've been wondering about whether monadic functions that do NOT us IO can be pure or not.  There seems to be some confusion on this topic on the web.  I'm especially interested in whether they can be memoized.  It seems to me that something like a function in the State monad should be pure provided the same initial state and same function arguments are present.  Likewise with the list monad and most other monads in fact.
> 
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20101124/16cf10bc/attachment.html


More information about the Haskell-Cafe mailing list