blob: c114f2aa45b1d72ebc42714b52365781bdde53b8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
use hiccup::Mortgage;
use hiccup::MortgageUpdate::*;
use hiccup::MortgageUpdates;
use std::collections::HashMap;
fn main() {
let m = Mortgage::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.)),
}));
m.clone().run(updates);
// m.clone().run(HashMap::new());
}
|