 
 (defn conj [coll interval]
   (union coll [interval]))
-
-(defn derive-interval [x y from]
-  (augment-interval (interval x y) from))
 
 (defn intersection
   "Return an interval set that is the intersection of the input

         (case code
           (\p \m)  (recur (next xs) ys result)
           (\P \M)  (recur xs (next ys) result)
           \S (recur (cons (derive-interval (second y) (second x) x)
                           (next xs))
                     (next ys)
                     (clojure.core/conj result (augment-interval y x)))
           \F (recur (next xs) (next ys) (clojure.core/conj result y))
           \o (recur (cons (derive-interval (first y) (second x) x)
                           (next xs))
                     (cons (derive-interval (second x) (second y) x) (next ys))
                     (clojure.core/conj
                      result
                      (derive-interval (first y) (second x) x)))
           \O (recur (cons
                      (derive-interval (second y) (second x) x)
                      (next xs))
                     (next ys)
                     (clojure.core/conj
                      result
                      (derive-interval (first x) (second y) x)))
           \D (recur (cons
                      (derive-interval (second y) (second x) x)
                      (next xs))
                     (next ys)
                     (clojure.core/conj result (augment-interval y x)))
           \d (recur (next xs) (cons (derive-interval (second x) (second y) x)
                                     (next ys))
                     (clojure.core/conj result x))
           \e (recur (next xs) (next ys) (clojure.core/conj result x))
           \f (recur (next xs) (next ys) (clojure.core/conj result x))
           \s (recur (next xs)
                     (cons (derive-interval (second x) (second y) x)
                           (next ys))
                     (clojure.core/conj result x))))
       result)))


;; Functions that make use of Allens' Interval Algebra

(defn- update-interval
  "Update the interval with the timings of the second interval. The
  purpose of updating is to preserve any extra data in the interval."
  ([ival times]
   (vec (concat (take 2 times) (drop 2 ival))))
  ([ival x y]
   (update-interval ival (interval x y))))

(defn concur
  "Return the interval representing the interval, if there is one,
  representing the interval of time the given intervals are
