Re: [Haskell-cafe] [Haskell] mapM with Traversables

2011-09-30 Thread Ryan Ingram
You can use Data.Sequence.fromList to go [a] - Seq a, though. So given f :: Monad m = a - m b you have import Data.Traversable as T import Data.Sequence as S g :: Monad m = [a] - m (S.Seq b) g = T.mapM f . S.fromList - ryan On Wed, Sep 28, 2011 at 6:20 PM, Marc Ziegert co...@gmx.de wrote:

Re: [Haskell-cafe] [Haskell] mapM with Traversables

2011-09-28 Thread Marc Ziegert
Hi Thomas, this should be on the haskell-cafe or haskell-beginners mailing list. Haskell@... is mainly for announcements. You have: f :: Monad m = a - m b Data.Traversable.mapM :: (Monad m, Traversable t) = (a - m b) - t a - m (t b) So, if you define g with g