pub fn tupled<A, B, C>(f: impl Fn(A, B) -> C) -> impl Fn((A, B)) -> CExpand description
Function.tupled — convert a two-argument function into a function that takes a tuple.
use id_effect::func::tupled;
let add = |a: i32, b: i32| a + b;
let tupled_add = tupled(add);
assert_eq!(tupled_add((3, 4)), 7);