iterate -package +containers

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))