Hi -
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:
g :: [a] -> m (Seq b)
g a = do Data.Traversable.mapM f a -- type error!
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?
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"?
Thanks for any comments!
Thomas