rotate

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));

Requirements

F must be:

Example

#include <fit.hpp>
#include <cassert>

int main() {
    int r = fit::rotate(fit::_ - fit::_)(2, 5);
    assert(r == 3);
}