diff options
author | Guillermo Ramos | 2025-02-04 00:09:04 +0100 |
---|---|---|
committer | Guillermo Ramos | 2025-02-04 01:02:01 +0100 |
commit | 8907130570df1a67d30a0266c2ba17c27975d713 (patch) | |
tree | 0edfbc66905acb3c27c1fa70034781437582fe92 /src/main.rs | |
parent | 2a70a5e09e36d00b9b46ded6eda9fbaf0cc5352a (diff) | |
download | hiccup-8907130570df1a67d30a0266c2ba17c27975d713.tar.gz |
Mortgage updates
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 12 |
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()); } |