                                                       (do [%2])
                                                       (conj %1 %2))
                                                    candidate)))
+                                    conj
                                     successful?
                                     filtered-query-results)]
                               (or

      result)))

;; If transformed value passes test,
;; return a singleton list of those;
;; otherwise, return the full list of transformed stuffs.
;; This is because lazy seqs in clojure aren't exactly lazy;
;; they're "chunked" lazy, which is sad. Sad panda :'(
(defn- first-found
  [f pred coll]
  (reduce
    (fn find-first
      [c v]
      (let [new-v (f v)]
        (if (pred new-v)
          (reduced [new-v])
          (conj c new-v))))
    []
    coll))


      (let [fclause (first clauses)
            rclauses (rest clauses)
            {:keys [clause parent]}
            fclause
            mkerror (partial make-error
                             present-packages
                             found-packages
                             absent-specs
                             clause)]
        (if (empty? clause)
          (mkerror :empty-alternative-set)
          (let [clause-result
                (first-found
                  (fn try-alternative
