pub trait FP {
fn fmap<F>(&self, f: F) -> Matrix
where
F: Fn(f64) -> f64;
fn reduce<F, T>(&self, init: T, f: F) -> f64
where
F: Fn(f64, f64) -> f64,
T: Into<f64>;
fn zip_with<F>(&self, f: F, other: &Matrix) -> Matrix
where
F: Fn(f64, f64) -> f64;
}