Hi - <div><br></div><div>I have a function, "f :: Monad m => a -> m b", as well as a list of a's. I'd like to produce a sequence (Data.Sequence) of b's, given the a's:</div><div><br></div><div>
g :: [a] -> m (Seq b)</div><div>g a = do Data.Traversable.mapM f a -- type error!</div><div><br></div><div>I see that "Data.Traversable.mapM f a" doesn't work... is this like asking the compiler to infer the cons/append operation from the type signature of g?</div>
<div><br></div><div>Do I need to write my own function that explicitly calls the "append" functions from Data.Sequence or can I do something else that would work for any "g :: Traversable t, Traversable u => t a -> m (u b)" given "f :: a -> m b"?</div>
<div><br></div><div>Thanks for any comments!</div><div>Thomas</div><div><br></div><div><br></div>