apply

Function apply 

Source
pub fn apply<C, A, T>(f: C, args: A) -> C::Output
where C: Callable<A, T>,
Expand description

Apply f on args.

Equivalent to: f.call(args).

See: Callable::call.

§Examples

fn f(x: i32) -> i32 { x + 1 }

let y = apply(f, ("🦀", 41));
assert_eq!(y, 42);