:: Int -> (a -> a) -> a -> a -package:rio
Apply a function n times to a given value.
Compositional power of a function, i.e. apply the function n
times to a value. It is rather the same as iter in Simon
Thompson: "The Craft of Functional Programming", page 172
Apply a function n times to a given value
Apply a function the specified number of times, which should be > 0
(otherwise does nothing). Possibly uses O(n) stack ?
Compositional power of a function, i.e. apply the function n times to
a value.
iterate' n f x applies
f to
x
n times and returns the result.
The applications are calculated strictly.
applyWhen b f a applies f to a when
b.
applyUnless b f a applies f to a unless
b.