replicate

replicate :: Int -> a -> [a]
base Prelude, base Data.List
replicate n x is a list of length n with x the value of every element. It is an instance of the more general Data.List.genericReplicate, in which n may be of any integral type.
replicate :: Int -> Char -> ByteString
bytestring Data.ByteString.Char8
O(n) replicate n x is a ByteString of length n with x the value of every element. The following holds: > replicate w c = unfoldr w (\u -> Just (u,u)) c This implemenation uses memset(3)
replicate :: Int -> Text -> Text
text Data.Text
O(n*m) replicate n t is a Text consisting of the input t repeated n times.
replicate :: Int -> Word8 -> ByteString
bytestring Data.ByteString
O(n) replicate n x is a ByteString of length n with x the value of every element. The following holds: > replicate w c = unfoldr w (\u -> Just (u,u)) c This implemenation uses memset(3)
replicate :: Int -> a -> Seq a
containers Data.Sequence
O(log n). replicate n x is a sequence consisting of n copies of x.
replicate :: Int64 -> Char -> ByteString
bytestring Data.ByteString.Lazy.Char8
O(n) replicate n x is a ByteString of length n with x the value of every element.
replicate :: Int64 -> Text -> Text
text Data.Text.Lazy
O(n*m) replicate n t is a Text consisting of the input t repeated n times.
replicate :: Int64 -> Word8 -> ByteString
bytestring Data.ByteString.Lazy
O(n) replicate n x is a ByteString of length n with x the value of every element.
replicateM :: Monad m => Int -> m a -> m [a]
base Control.Monad
replicateM n act performs the action n times, gathering the results.
replicateM_ :: Monad m => Int -> m a -> m ()
base Control.Monad
Like replicateM, but discards the result.
replicateA :: Applicative f => Int -> f a -> f (Seq a)
containers Data.Sequence
replicateA is an Applicative version of replicate, and makes O(log n) calls to <*> and pure. > replicateA n x = sequenceA (replicate n x)
replicateM :: Monad m => Int -> m a -> m (Seq a)
containers Data.Sequence
replicateM is a sequence counterpart of replicateM. > replicateM n x = sequence (replicate n x)
ReplicateBorder :: ConvolutionBorderMode
OpenGL Graphics.Rendering.OpenGL.GL.PixelRectangles.Convolution
package ReplicateEffects
package
genericReplicate :: Integral i => i -> a -> [a]
base Data.List
The genericReplicate function is an overloaded version of replicate, which accepts any Integral value as the number of repetitions to make.