
Functions are expected to terminate; therefore, one needs the concept of a
continuing computation.
In Haskell, monads represent the continuing context containing the
terminating functions.
Having your functions run in a monad is not a limitation.
--
--
Sent from an expensive device which will be obsolete in a few months! :D
Casey
On Nov 4, 2014 5:33 AM, "Carter Schonwald"
Threading the state can also mean using the STATE monad as suggested Earlier. On Nov 4, 2014 3:54 AM, "Hiromi ISHII"
wrote: Hi,
On 2014/11/02 18:50, Travis Cardwell
wrote: Indeed: many algorithms merely require values from a uniform distribution, not necessarily random numbers. I was hopeful that Cantor-Zassenhaus would be one of them.
Looking at your code [1], I see that you are exporting both `equalDegreeSplitM`, which uses `uniform` from `Control.Monad.Random`, and `equalDegreeFactorM`, which iteratively calls `equalDegreeSplitM`. One of the challenges of using a pure uniform stream is threading the state: since both functions are exported, implementation details would leak anyway.
"Threading the state" means "using ST monad", right? If so, I think we can use algebraic numbers only within ST monad, so it would be too restrictive to do some calculation.
Great work, by the way! :)
Thanks!
-- Hiromi ISHII konn.jinro@gmail.com
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe