iterate -package

iterate :: (a -> a) -> a -> [a]
base Prelude, base Data.List
iterate f x returns an infinite list of repeated applications of f to x: > iterate f x == [x, f x, f (f x), ...]
iterate :: (Char -> Char) -> Char -> ByteString
bytestring Data.ByteString.Lazy.Char8
iterate f x returns an infinite ByteString of repeated applications of f to x: > iterate f x == [x, f x, f (f x), ...]
iterate :: (Word8 -> Word8) -> Word8 -> ByteString
bytestring Data.ByteString.Lazy
iterate f x returns an infinite ByteString of repeated applications of f to x: > iterate f x == [x, f x, f (f x), ...]
iterateN :: Int -> (a -> a) -> a -> Seq a
containers Data.Sequence
O(n). Constructs a sequence by repeated application of a function to a seed value. > iterateN n f x = fromList (Prelude.take n (Prelude.iterate f x))