Compositional power of a function,
i.e. apply the function
n times to a value.
It is rather the same as
in Simon Thompson: "The Craft of Functional Programming", page 172
powerAssociative is an auxiliary function that,
for an associative operation
computes the same value as
powerAssociative op a0 a n = foldr op a0 (genericReplicate n a)
but applies op O(log n) times and works for large n.