Function tool::flip[][src]

pub fn flip<F, A, B, R>(
    f: F
) -> impl Fn(B, A) -> R where
    F: Fn(A, B) -> R, 

Flip the argument order of a two-parameter function.

Specifically, flip(f: Fn(a: A, b: B) -> C) = |b: B, a: A| f(a, b).