diff --git a/src/Lib.hs b/src/Lib.hs index 11a599af4ee611591ba6a4d6f71c001c956d2ceb..927a748b5ca10f2a7e6793c8b3ca8f4ed8b03cd4 100755 --- a/src/Lib.hs +++ b/src/Lib.hs @@ -37,3 +37,5 @@ powervalue m = 1 / (power (1 + interest) m) -- anonymus function factorpresentvalue = map (\x -> powervalue x) [1..5] +-- high order function +presentvalue = zipWith (*) (netcashflow income outcome) factorpresentvalue