In the standard prelude:
Prelude> :t iterate
iterate :: (a -> a) -> a -> [a]
However, in classy prelude there is no iterate, so I presume there might be some more generic function to do the same, perhaps a monadic one. I just cannot figure out what it is. Is there one?
iterateorunfold) are less common than generalized catamorphisms (likemaporfold). It think it's more likelyiteratewas omitted because it isn't used commonly enough to warrant inclusion in a redesigned prelude. - chepner