                 (let [grp-size            (max 512 (long (/ (count @active) threads)))
                       [act' sigs' colls'] (scheduler grp-size @active)]
                   ;;(warn :auto (count @queue))
-                  (reset! active
-                          #?(:clj
-                             (into (into #{} v-filter act') @queue)
-                             :cljs ;; FIXME CLJS doesn't support reducers on sets
-                             (vec (into (into #{} v-filter act') @queue))))
+                  (reset! active (into (into #{} v-filter act') @queue))
                   (reset! queue #{})
                   (recur (long (+ colls colls')) (long (+ sigs sigs'))))
                 (->result :max-ops-reached sigs colls t0))

  [ctx]
  (let [processor ((:processor ctx) (:signal-thresh ctx) (:collect-thresh ctx))]
    (fn [workgroup-size vertices]
      (r/fold workgroup-size single-pass-combine processor vertices))))

(defn two-pass-scheduler
  [ctx]
  (let [sig-fn  ((:signal-fn ctx) (:signal-thresh ctx))
        coll-fn ((:collect-fn ctx) (:collect-thresh ctx))]
    (fn [_ vertices]
      (let [[s-act sigs]  (sig-fn vertices)
            [c-act colls] (coll-fn vertices)]
        [(into s-act c-act) sigs colls]))))


(defn default-score-signal
  "Computes vertex signal score. Returns 0 if value equals prev-val,
  else returns 1."
  [vertex] (if (= @vertex @(:prev-val vertex)) 0 1))

(defn score-signal-with-new-edges
  "Computes vertex signal score. Returns number of *new* outgoing
  edges plus 1 if value not equals prev-val. New edge counter is reset
  each time signal! is called."
  [vertex] (+ (::new-edges @(:state vertex)) (if (= @vertex @(:prev-val vertex)) 0 1)))

(defn default-score-collect
  "Computes vertex collect score, here simply the number
