pub trait FPVector {
fn fmap<F>(&self, f: F) -> Vector
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: &Vector) -> Vector
where
F: Fn(f64, f64) -> f64;
}