
Generally speaking, all Haskell functions are pure unless they use unsafe- functions or FFI inside.
Отправлено с iPhone
Nov 24, 2010, в 23:46, Gregory Propf
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@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe