rotate¶
Header¶
#include <fit/rotate.hpp>
Description¶
The rotate
function adaptor moves the first parameter to the last
parameter.
Synopsis¶
template<class F>
rotate_adaptor<F> rotate(F f);
Semantics¶
assert(rotate(f)(x, xs...) == f(xs..., x));
Example¶
#include <fit.hpp>
#include <cassert>
int main() {
int r = fit::rotate(fit::_ - fit::_)(2, 5);
assert(r == 3);
}