replicate -package:Cabal -package:base -package:bytestring -package:text package:protolude

replicate n x is a list of length n with x the value of every element. It is an instance of the more general genericReplicate, in which n may be of any integral type.
replicateM n act performs the action n times, gathering the results. Using ApplicativeDo: 'replicateM 5 as' can be understood as the do expression
do a1 <- as
a2 <- as
a3 <- as
a4 <- as
a5 <- as
pure [a1,a2,a3,a4,a5]
Note the Applicative constraint.
Like replicateM, but discards the result.
The genericReplicate function is an overloaded version of replicate, which accepts any Integral value as the number of repetitions to make.