-;;;; From http://ianrumford.github.io/blog/2013/08/25/some-trivial-examples-of-using-clojure-reducers/
-;;;; and the corresponding gist at https://gist.github.com/ianrumford/6333358
-
 (ns com.nomistech.clojure-the-language.reducers-rumford-test
   (:require [clojure.core.reducers :as r]
             [clojure.string :as string]
             [midje.sweet :refer :all]))
 
-;; The Families in the Village
+;;;; From http://ianrumford.github.io/blog/2013/08/25/some-trivial-examples-of-using-clojure-reducers/
+;;;; and the corresponding gist at https://gist.github.com/ianrumford/6333358
+
+;;;; With extras.
+
+
+;;;; ___________________________________________________________________________
 
 (def village
-  [
-   {:home :north :family "smith" :name "sue" :age 37 :sex :f :role :parent}
+  "The Families in the Village"
+  [{:home :north :family "smith" :name "sue" :age 37 :sex :f :role :parent}
    {:home :north :family "smith" :name "stan" :age 35 :sex :m :role :parent}
    {:home :north :family "smith" :name "simon" :age 7 :sex :m :role :child}
    {:home :north :family "smith" :name "sadie" :age 5 :sex :f :role :child}
-   
    
    {:home :south :family "jones" :name "jill" :age 45 :sex :f :role :parent}
    {:home :south :family "jones" :name "jeff" :age 45 :sex :m :role :parent}

;; =>
3

;;;; ___________________________________________________________________________

;; Example 4 - making a collection how many children's names start with J?


(defn ex7-make-visitors [n] (take n (repeatedly ex7-make-visitor)))

;;(def ex7-visitors (ex7-make-visitors 100))
(def ex7-visitors (into [] (ex7-make-visitors 1000000)))

;; Example 7 - count the visiting Brown children using reduce
;;(time (r/reduce + 0 (ex2-pipeline ex7-visitors)))
