fn_zip 0.1.2

Provides a zip trait for functions, allowing two functions to be combined at compile-time before being called.
fn_zip-0.1.2 doesn't have any documentation.

Combines two functions into one where the arguments are conjoined and the return-values are given in a tuple pair.

Example

use fn_zip::FnZip;

fn a(x: f32) -> f64
{
(x as f64).sqrt()
}
fn b(x: u8) -> u8
{
x + 1
}
let ab = a.fn_zip(b); // (f32, u8) -> (f64, u8)

let (x_a, x_b) = (4.0, 23);

let (y_a, y_b) = ab(x_a, x_b);

assert_eq!(y_a, a(x_a));
assert_eq!(y_b, b(x_b));