[Haskell-cafe] monadic MapReduce

Manlio Perillo manlio_perillo at libero.it
Thu Mar 5 05:24:34 EST 2009


Anish Muttreja ha scritto:
> [...]
> 
> How about this. Is there a reason why I can't 
> replace the variables b and c in the type signature of mapReduce with with (IO b') 
> and (IO c'). b and c  can be any types. 
> 
> mapReduce :: Strategy (IO b')    -- evaluation strategy for mapping
>            -> (a -> IO b')      -- map function
>            -> Strategy (IO c')    -- evaluation strategy for reduction
>            -> ([IO b'] -> (IO c'))    -- reduce function
>            -> [a]           -- list to map over
>            -> (IO c')
> 
> Just remember to wrap all values back in the IO monad.
> 


The other day I found, with google, a definizion of mapReduce, that make 
use of forkIO to execute piece of IO actions on separate threads.

I can't find it anymore...

> Anish
> 


Manlio


More information about the Haskell-Cafe mailing list