x '^.' 'iterated' f@ returns an infinite 'Fold1' of repeated applications of @f@ to @x@.
--
-- @
-- 'toListOf' ('iterated' f) a ≡ 'iterate' f a
-- @
--
-- @
-- 'iterated' :: (a -> a) -> 'Fold1' a a
-- @
iterated :: Apply f => (a -> a) -> LensLike' f a a
iterated f g a0 = go a0 where
  go a = g a .> go (f a)
{-# INLI
iterated :: Apply f => (a -> a) -> LensLike' f a a
iterated f g a0 = go a0 where
  go a = g a .> go (f a)

iterated f g a0 = go a0 where
  go a = g a .> go (f a)
