Creating a fold that allows the type to change after each repeated function call, in order to call a function n times without recursion.
Creating a fold that allows the type to change after each repeated function call, in order to call a function n times without recursion