2010/1/5 Dale Jordan <[email protected]>:

> The motivation for iterateR is to be able to have the ultimate
> consumer determine how many random values to force, but still have a
> single random generator used throughout the computation.


Hi Dale

If you want the producer and consumer to run at different speeds with
something in-between to synchronize them (velomorphisms anyone?), you
might want to look at Jeremy Gibbons's spigot algorithm for pi and
also his metamorphisms paper.


http://www.comlab.ox.ac.uk/oucl/work/jeremy.gibbons/publications/spigot.pdf
http://www.comlab.ox.ac.uk/oucl/work/jeremy.gibbons/publications/metamorphisms-scp.pdf

That said, I've personally found it hard to frame code in the spigot
style so I couldn't readily offer any tips on the code you've
presented.

Best wishes

Stephen
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to