8 ms·
You can still have mutable references and impure functions in Haskell, but its not like "path of least resistance" of other languages. The IO type marks impure
by sudomakeup 8y ago
You can still have mutable references and impure functions in Haskell, but its not like "path of least resistance" of other languages. The IO type marks impure functions
Also one can use STRef if they want to have a pure function that is internally implemented with mutable values - that is all the side effects are self contained.
http://gamasutra.com/view/news/169296/Indepth_Functional_programming_in_C.php http://gamasutra.com/view/news/169296/Indepth_Functional_pro...
"a function can still be pure even if it calls impure functions, as long as the side effects don't escape the outer function"