<div dir="ltr"><div>I'm trying to parallelize a Monte Carlo backtracking search algorithm. The trick is that my algorithm is expressed in a State monad, because I need to hold a StdGen as well as keep several records of computations and metrics.</div><div><br></div><div>So I know that if I'm going to run a State computation in several parallel lines of execution, I need to conceive of a way to split the state and later recombine it.</div><div><br></div><div>Here is a simple example I came up with. I have no idea if I'm doing this in a good way, so any comments are welcome.</div><div><br></div><a href="http://lpaste.net/356879">http://lpaste.net/356879</a><br><div><br></div><div>D</div><div><br></div></div>