view src/rlm/expenses.clj @ 9:1065e7d615a4 tip

deactivate some cruft.
author Robert McIntyre <rlm@mit.edu>
date Mon, 08 Jul 2013 12:51:12 -0400
parents 78a630e650d2
children
line wrap: on
line source
1 (ns rlm.expenses)
4 (def static-expenses
5 [500 ;; for Books
6 600 ;; to get to Wisconsisn
7 200 ;; install internet satelite
8 1000 ;; shipping
9 ])
12 (def monthly-expenses
13 [600 ;; rent
14 120 ;; internet
15 120 ;; vehicle maintance
16 600 ;; stipend (food, gas)
17 ])
19 (defn cost-per-month [num-months]
20 (float
21 (/
22 (+
23 (* num-months (reduce + monthly-expenses))
24 (reduce + static-expenses))
25 num-months)))