transient-0.1.0.2: A monad for extensible effects and primitives for unrestricted composability of applications

Safe HaskellNone
LanguageHaskell2010

Transient.Indeterminism

Description

Synopsis

Documentation

choose :: [a] -> TransientIO a Source

slurp a list of values and process them in parallel . To limit the number of processing threads, use threads

choose' :: [a] -> TransientIO a Source

alternative definition with more parallelism

collect :: Int -> TransientIO a -> TransientIO [a] Source

execute a process and get the first n solutions. if the process end without finding the number of solutions requested, it return the fond ones if he find the number of solutions requested, it kill the threads of the process and return It works monitoring the solutions found and the number of active threads. If the first parameter is 0, collect will return all the results

group :: Int -> TransientIO a -> TransientIO [a] Source

group the output of a possible multithreaded process in groups of n elements.