 
 (defn whizbang
   [t-series start-period end-period & cofactors]
-  [t-series (apply vector cofactors)])
+  (map (partial lengthening-ts start-period end-period) (apply vector t-series cofactors))
+  #_(map long-trend
+       (map (partial lengthening-ts start-period end-period)
+            (apply vector t-series cofactors))))
 
 
 
-;; (map long-trend
-;;        ((partial lengthening-ts start-period end-period)
-;;           [t-series cofactors]))
+

  element is that associated with the time-trend. The try statement is
  meant to check whether the cofactor matrix is singular."
  [attributes t-series & cofactors]
  {:pre [(not (empty? cofactors))]}
  (let [y (deseasonalize (vec t-series))
        X (if (empty? cofactors)
            (i/matrix (t-range y))

(defn windowed-apply 
  "apply a function [f] to a window along a sequence [xs] of length [window]"
  [f window xs]
  (pmap f (partition window 1 xs)))

;; WHOOPBANG

