   ([f]
      (fn [rf]
        (let [a (array-list)
-             pa (atom ::none)]
+             pa (volatile! ::none)]
          (fn
            ([] (rf))
            ([result]

           ([result input]
              (let [pval @pa
                    val (f input)]
                (reset! pa val)
                (if (or (keyword-identical? pval ::none)
                        (= val pval))
                  (do

  Returns a transducer when no collection is provided."
  ([]
   (fn [rf]
     (let [pa (volatile! ::none)]
       (fn
         ([] (rf))
         ([result] (rf result))
         ([result input]
            (let [prior @pa]
              (vreset! pa input)
              (if (= prior input)
                result
                (rf result input))))))))
