        "Circular Map"
        was-visited)
      (let [out (js-obj)]
-       (visit! visited obj out)
+       (swap! visited assoc obj out)
        (dorun
         (map
          #(let [key (->js (first %)  flat visited)

       "Circular NS"
       was-visited)
     (let [out (js-obj)]
       (visit! visited obj out)
       (dorun
        (map
         #(let [key %

       "Circular Seq"
       was-visited)
     (let [out (array)]
       (swap! visited assoc obj out)
       (array-append out (map #(->js % flat visited) obj)))))

  ([obj flat] (seq->js obj flat (atom {})))
