power (x, n); power (x, n, monoid_operation);
The iota
function wins the award for Extension With the
Coolest Name (the name comes from Ken Iverson's APL language.) As
described in the SGI
documentation, it "assigns sequentially increasing values to a range.
That is, it assigns value
to *first
,
value + 1
to *(first + 1)
and so on."
void iota(_ForwardIter first, _ForwardIter last, _Tp value);
The iota
function is included in the ISO C++ 2011 standard.