Mercurial > rlm
view src/rlm/expenses.clj @ 6:b8bbb0dbda7b
merging
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Thu, 01 Mar 2012 05:55:59 -0700 |
parents | 78a630e650d2 |
children |
line wrap: on
line source
1 (ns rlm.expenses)4 (def static-expenses5 [500 ;; for Books6 600 ;; to get to Wisconsisn7 200 ;; install internet satelite8 1000 ;; shipping9 ])12 (def monthly-expenses13 [600 ;; rent14 120 ;; internet15 120 ;; vehicle maintance16 600 ;; stipend (food, gas)17 ])19 (defn cost-per-month [num-months]20 (float21 (/22 (+23 (* num-months (reduce + monthly-expenses))24 (reduce + static-expenses))25 num-months)))