 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Util ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
+(defn lazy-map
+  "A lazier version of map so that calling (take 1 (map submit! multidoc))
+  on a lazy-seq made by multimethod make-job :docs doesn't cause
+  print events to be realized sooner than they should be due to
+  chunking."
+  {:since "0.0.1"}
+  [f coll]
+  (if (seq coll)
+    (lazy-seq (cons (f (first coll)) (lazy-map f (rest coll))))
+    nil))
+
 (defn- choose-source-key
   "Returns a keyword representative of the document source's
    type."
-  {:since "1.0"}
+  {:since "0.0.1"}
   [source]
   (cond (try (.. (io/file source) exists) (catch Throwable t)) :file
         (try (URL. source) (catch Throwable t)) :url

      (-> spec (dissoc :docs) (assoc :doc doc) make-job))))

;; Old method of encapsulating a 'MultiJobSpec', most
;; values in a JobSpec will be Singleton/Enum instances
;; anyways, so structural sharing may not be necessary,
;; though I'll throw this in here anyways:
;;

(defn- choose-flavor
  "Attempts to guess the appropriate DocFlavor for the document.
   Returns nil if no suitable DocFlavor is found."
  {:since "0.0.1"}
  [source]
  (condp = (choose-source-key source)
    :file (:autosense flavors/input-streams)
