WIP: replace loop controls with a bound type and max_iterations count.