replicateM -> replicateA ?
clayrat opened this issue · 4 comments
clayrat commented
It seems that Monad isn't really necessary here, Applicative is enough:
replicateA :: forall f a. Applicative f => Int -> f a -> f (List a)
replicateA n f
| n < one = pure nil
| otherwise = cons <$> x <*> replicateA (n - one) f
MonoidMusician commented
close?
paf31 commented
Thanks
clayrat commented
Hm, I thought about removing this function here, or at least putting a deprecation notice, but I guess I forgot.