replicateM

66 views
Skip to first unread message

Runar Bjarnason

unread,
May 16, 2012, 6:18:20 PM5/16/12
to sca...@googlegroups.com
Noticed that replicateM is not in scalaz-seven. I want to add it, but where would it go?

Runar


Jason Zaugg

unread,
May 16, 2012, 6:52:18 PM5/16/12
to sca...@googlegroups.com
On Thu, May 17, 2012 at 12:18 AM, Runar Bjarnason <runar...@gmail.com> wrote:
> Noticed that replicateM is not in scalaz-seven. I want to add it, but where
> would it go?

I would pop it on Monad, with a forwarder on MonadOps. (Admittedly,
this is a bit arbitrary; you could also argue for Monoid, or Pointed.)

-jason

https://github.com/scalaz/scalaz/blob/master/core/src/main/scala/scalaz/MA.scala#L263

Paul Chiusano

unread,
May 16, 2012, 9:08:35 PM5/16/12
to sca...@googlegroups.com
Actually, despite the name, all it needs is Applicative, so it should probably go there. Other syntax can reference the definition there.


--
You received this message because you are subscribed to the Google Groups "scalaz" group.
To post to this group, send email to sca...@googlegroups.com.
To unsubscribe from this group, send email to scalaz+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/scalaz?hl=en.


Paul Chiusano

unread,
May 16, 2012, 9:11:15 PM5/16/12
to sca...@googlegroups.com
Also, we don't have to call it replicateM, we can just call it replicate, at least on the Applicative trait.
Reply all
Reply to author
Forward
0 new messages