
A number of types support some version of replication. Lists and vectors offer replicateM, while sequences have replicateA (the same thing, but generalized to Applicative). Is there, or should there be, a class for structures that support this operation?

mono-traversable has Data.Sequences.IsSequence, but it “should be considered highly experimental”. http://hackage.haskell.org/package/mono-traversable/docs/Data-Sequences.html
On 17 Sep 2015, at 19:21, David Feuer
wrote: A number of types support some version of replication. Lists and vectors offer replicateM, while sequences have replicateA (the same thing, but generalized to Applicative). Is there, or should there be, a class for structures that support this operation?
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe

That class has a lot of other things in it too, and does not offer
replicateA.
On Sep 17, 2015 7:49 PM, "Andrew Morris"
mono-traversable has Data.Sequences.IsSequence, but it “should be considered highly experimental”.
http://hackage.haskell.org/package/mono-traversable/docs/Data-Sequences.html
On 17 Sep 2015, at 19:21, David Feuer
wrote: A number of types support some version of replication. Lists and vectors offer replicateM, while sequences have replicateA (the same thing, but generalized to Applicative). Is there, or should there be, a class for structures that support this operation?
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
participants (2)
-
Andrew Morris
-
David Feuer