 ;;;;;;;;;;;;;;;;;;; fundamentals ;;;;;;;;;;;;;;;
 
 (declare array-seq prim-seq IndexedSeq)
+
+(defn iterable? [x]
+  (satisfies? IIterable x))
 
 (defn clone [value]
   (-clone value))

(defprotocol ISwap
  (-swap! [o f] [o f a] [o f a b] [o f a b xs]))

;; Printing support

(deftype StringBufferWriter [sb]

    (nil? coll) (nil-iter)
    (string? coll) (string-iter coll)
    (array? coll) (array-iter coll)
    (iterable? coll) (-iterator coll)
    (seqable? coll) (seq-iter coll)
    :else (throw (js/Error. (str "Cannot create iterator from " coll)))))

(declare LazyTransformer)

