comparison org/man-years.org @ 3:44f31e2126fa

cleanup
author Robert McIntyre <rlm@mit.edu>
date Thu, 20 Oct 2011 07:35:52 -0700
parents c29b950c8729
children 6842199d5e26
comparison
equal deleted inserted replaced
2:c29b950c8729 3:44f31e2126fa
5 #+keywords: man-year man-month man-hour universe human experience philosophy 5 #+keywords: man-year man-month man-hour universe human experience philosophy
6 #+setupfile: ../../aurellem/org/setup.org 6 #+setupfile: ../../aurellem/org/setup.org
7 #+include: ../../aurellem/org/level-0.org 7 #+include: ../../aurellem/org/level-0.org
8 #+babel: :results output :exports both 8 #+babel: :results output :exports both
9 9
10 * What is a Man-Hour 10 * What is a Man-Hour?
11 11
12 A [[http://en.wikipedia.org/wiki/Man-hour][/Man-Hour/]] is a term from the field of Management. It is one hour 12 A [[http://en.wikipedia.org/wiki/Man-hour][/Man-Hour/]] is a term from the field of Management. It is one hour
13 of work by one person for a certain task. 13 of work by one person for a certain task.
14 14
15 For example, if I have a nine-to-five programming job at Initrode, but 15 For example, if I have a nine-to-five programming job at Initrode, but
130 ]) 130 ])
131 "lifespans in years from birth for the various time periods") 131 "lifespans in years from birth for the various time periods")
132 132
133 133
134 134
135 ;; multiply each time-period's total number of people
136 ;; by those people's average lifespan in years to get
137 ;; the total number of man-years experienced during
138 ;; that period, then add them together.
139 135
136
137 ;; This section is just here to make the result look pretty.
140 (dorun 138 (dorun
141 (map println 139 (map println
142 (clojure.contrib.string/split 140 (clojure.contrib.string/split
143 #"," 141 #","
144 (cl-format nil "years of human experience: \n ~R years" 142 (cl-format
145 (reduce + 143 nil "years of human experience: \n ~R years"
146 (map * 144 ;; Multiply each time-period's total number of people
147 (map births time-periods) 145 ;; by those people's average lifespan in years to get
148 (map lifespans time-periods))))))) 146 ;; the total number of man-years experienced during
147 ;; that period, then add them together.
148 (reduce +
149 (map *
150 (map births time-periods)
151 (map lifespans time-periods)))))))
149 152
150 #+end_src 153 #+end_src
151 154
152 #+results: 155 #+results:
153 : years of human experience: 156 : years of human experience: