annotate src/douglas_adams.clj @ 0:307a81e46071 tip

initial committ
author Robert McIntyre <rlm@mit.edu>
date Tue, 18 Oct 2011 01:17:49 -0700
parents
children
rev   line source
rlm@0 1 (ns coderloop.douglas-adams
rlm@0 2 (:refer-clojure :only [])
rlm@0 3 (:require rlm.ns-rlm rlm.light-base))
rlm@0 4 (rlm.ns-rlm/ns-clone rlm.light-base)
rlm@0 5
rlm@0 6 (use '[clojure [string :only [trim blank? split]]])
rlm@0 7
rlm@0 8
rlm@0 9
rlm@0 10 (defn brute-force-life [coll]
rlm@0 11 (dorun (map println (take-while (comp not (partial = 42)) coll))))
rlm@0 12
rlm@0 13
rlm@0 14
rlm@0 15
rlm@0 16
rlm@0 17 (if (command-line?)
rlm@0 18 (brute-force-life (read-integers (file-str (first *command-line-args*))))
rlm@0 19 nil)
rlm@0 20