<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>LICENSE</filename>
    </added>
    <added>
      <filename>PRACTICAL-CL-LICENSE</filename>
    </added>
    <added>
      <filename>README</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -9,3 +9,35 @@
 (defn make-rectangle 
   ([width] (make-rectangle width width))
   ([width height] {:width width :height height}))
+
+; not obvious how to get the var-supplied idiom from CL
+(defn which-args-supplied [{:keys [a b c] :as all :or {a 2 b 3}}]
+  (let [c-supplied (contains? all :c)]
+    (list a b c c-supplied)))
+
+; can't write return-from, because defn does not wrap in named entity
+
+; do this instead
+(defn pair-with-product-greater-than [n]
+  (take 1 (for [i (range 10) j (range 10) :when (&gt; (* i j) n)] [i j])))
+
+; using dotimes instead of repeat from cl
+(defn plot [f min max step]
+  (doseq i (range min max step)
+    (dotimes _ (apply f [i]) (print &quot;*&quot;))
+    (println)))
+
+(defn stars [ct]
+  (apply str (take ct (repeat &quot;*&quot;))))
+
+; more idiomatic ?
+(defn plot [f min max step]
+  (doseq i (range min max step)
+    (print (stars (apply f [i])))
+    (println)))
+
+; anonymous function examples
+; (plot (fn [x] (* x 2)) 1 10)
+
+; shorter (like Groovy's 'it')
+; (plot #(* 2 %) 1 10 1)</diff>
      <filename>chap_05.clj</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
 (println &quot;custom settings loaded...&quot;)
 (. clojure.lang.RT (loadResourceScript &quot;clojure/contrib/lib/lib.clj&quot;))
 (clojure.contrib.lib/use '(clojure.contrib test-is))
-(defn f [test] (load-file test) (run-tests))
+</diff>
      <filename>user.clj</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>b956c0e9c8423635df3b2ee69b0987ed162af510</id>
    </parent>
  </parents>
  <author>
    <name>Stuart Halloway</name>
    <email>stu@thinkrelevance.com</email>
  </author>
  <url>http://github.com/stuarthalloway/practical-cl-clojure/commit/f393905f6862910ff318d7846e32d4c853e286b7</url>
  <id>f393905f6862910ff318d7846e32d4c853e286b7</id>
  <committed-date>2008-09-15T11:46:11-07:00</committed-date>
  <authored-date>2008-09-15T11:46:11-07:00</authored-date>
  <message>completed chapter 5 
added license and credits</message>
  <tree>15c90364d9b0fda9fb6052d70a6506546e0eb9ee</tree>
  <committer>
    <name>Stuart Halloway</name>
    <email>stu@thinkrelevance.com</email>
  </committer>
</commit>
