use hiccup::MortgageUpdate::*; use hiccup::{MortgageUpdates, Simulation}; use std::collections::HashMap; fn main() { let mut sim = Simulation::new(390_000., 0.028, 30); let updates: MortgageUpdates = HashMap::from_iter((0..29).map(|y| match y { 0 => (0, Amortize(30_000.)), _ => (y * 12, Amortize(12_000.)), })); // let mut sim = Simulation::new(200_000., 0.01621, 30); // let updates: MortgageUpdates = HashMap::new(); sim.run(updates); sim.render_table(); }