On Mon, Mar 2, 2009 at 6:57 PM, Anish Muttreja <[email protected]> wrote:
> 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.

This is possible, but it probably won't do what you want. The input to
the reduce function will be  a list of "IO a" values, not the results
of performing the IO.

-- 
Dave Menendez <[email protected]>
<http://www.eyrie.org/~zednenem/>
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to