[Haskell-cafe] Data.Sequence and replicateM
petr.mvd at gmail.com
Fri Jan 25 19:37:44 CET 2013
2013/1/25 Daniel Díaz Casanueva <dhelta.diaz at gmail.com>
> Yes, you're right about the type context. I always forget that Functor is
> not a superclass of Monad. Anyway, the `fmap` can be done only with `Monad`
> in the context.
Instead of adding `Functor m` constraint you could write just
f n = liftM Seq.fromList . replicateM n
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe