iterate package:Stream

iterate f x function produces the infinite sequence of repeated applications of f to x.
iterate f x = [x, f x, f (f x), ..]