
29 Dec
2009
29 Dec
'09
12:44 p.m.
I'd write it as foo f = join .<$> sequence . (f <$>) where (.<$>) :: (.<$>) :: Functor f => (a -> b) -> ((x -> f a) -> (x -> f b)) x .<$> y = (x <$>) . y is part of my line-noise toolbox. This join .* sequence family of functions is quite common. Should really have a name for them. Tony Morris-4 wrote:
Can (liftM join .) . mapM be improved? (Monad m) => (a -> m [b]) -> [a] -> m [b]
-- View this message in context: http://old.nabble.com/%28liftM-join-.%29-.-mapM-tp26953786p26954040.html Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.