         (text->num ?line :> ?vector)
         (ols-coefficient ?vector pd :> ?sum)))
 
-;; MORE PLAYING WITH GLOB EXPRESSIONS
-
-(defn tiles->globstring
-  [& tiles]
-  {:pre [(not (some false? (map #(contains? valid-tiles %) tiles)))]}
-  (let [hv-seq (interpose "," (for [[th tv] tiles] (format "h%02dv%02d" th tv)))]
-    (format "*{%s}*" (apply str hv-seq))))
-
 (defn globfile-test
   [pattern]
   (let [source (globhfs-wholefile pattern)]
     (?<- (stdout) [?filename]
          (source ?filename ?file))))
-
-(defn -main []
-  (+ 4 5))

    (?<- (stdout) [?count]
         (files ?filename ?file)
         (c/count ?count))))

(defn add-floats
  "Returns a float array, for the purpose of stacking on to the end of
  a tuple. If the returned field works as a subquery result, we're in
  business."
  [file]
  (float-array 23 3.2))

(defn get-floats
  "Subquery to test float array serialization."
  [dir]
  (let [files (all-files dir)]
    (<- [?filename ?floats]
        (files ?filename ?file)
        (add-floats ?file :> ?floats)
        (:distinct false))))

(defn files-with-floats
  "Test of float array serialization."
  [dir]
  (let [stuff (get-floats dir)]
    (?<- (stdout) [?filename ?floats ?num]
         (stuff ?filename ?floats)
         (last ?floats :> ?num))))

(def tiles (memory-source-tap (vec valid-tiles)))

(defmapop checker [h-tile] (list (vec (range 50 60))))

(defmapop fives [arg]
  (vector [8 7]))

(defmapop fancyvec [coll indices]
  [(vec (map (vec coll) indices))])

(defmapop fancy [coll indices]
  [(map (vec coll) indices)])

(defn rain-tester []
  (?<- (stdout) [?name ?period ?h-tile ?v-tile ?checked ?mapped]
       (age ?name ?period)
       (small-tiles ?h-tile ?v-tile)
       (checker ?h-tile :> ?checked)
       (fives ?v-tile :> ?fives)
       (fancyvec ?checked ?fives :> ?mapped)
       (identity 1 :> ?_)))

(defn text->num
  "converts a text line of numbers to a float vectors; 


(ns forma.playground
  (:use cascalog.api
        cascalog.playground
        forma.hadoop.io)
  (:require [incanter.core :as i]
            [cascalog.ops :as c]
            [clojure.string :as s]))

(defn file-count
  "Prints the total count of files in a given directory to stdout."
