aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index 76c7913..bbe01af 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,4 +1,12 @@
+use hiccup::Mortgage;
+use hiccup::MortgageUpdate::{self, *};
+use std::collections::HashMap;
+
fn main() {
- let mut m = hiccup::Mortgage::new(390_000., 0.028, 30);
- m.run();
+ let mut updates: HashMap<u32, MortgageUpdate> =
+ HashMap::from_iter((1..29).map(|y| (y * 12, Amortize(24_000.))));
+ updates.insert(0, Amortize(15_000.));
+ let m = Mortgage::new(390_000., 0.028, 30);
+ m.clone().run(updates);
+ // m.clone().run(HashMap::new());
}