Hi,

 

How would I combine the functionalities of concatMap and mapM to define a function like:

Monad m => (a  -> m [b]) -> [a] -> m [b]

 

I need to create a recursive function within the IO monad which results in a list of the original type.

So something like:

goX :: MonadIO m => x -> m [x]

goX = do

….

x includes within it a list of xs, let's call it (children x)

I need to call goX on each of the children and get a modified list of children as result
ys <- ?

return $ x { children = ys } : zs

 

 

Thanks,

 

Renah Scarowsky

Suite Solutions

Create>Manage>Deploy

http://www.suite-sol.com