seq

functionsince v0.0-927 clojure.core/seqEdit
(seq coll)

Details:

Returns a sequence on the collection. If the collection is empty, returns nil.

(seq nil) returns nil.

seq also works on strings.


See Also:


Source docstring:
Returns a seq on the collection. If the collection is
empty, returns nil.  (seq nil) returns nil. seq also works on
Strings.
Source code @ clojurescript:src/main/cljs/cljs/core.cljs
(defn ^seq seq
  [coll]
  (when-not (nil? coll)
    (cond
      (implements? ISeqable coll)
      (-seq coll)

      (array? coll)
      (when-not (zero? (alength coll))
        (IndexedSeq. coll 0 nil))

      (string? coll)
      (when-not (zero? (.-length coll))
        (IndexedSeq. coll 0 nil))

      (js-iterable? coll)
      (es6-iterator-seq
        (.call (gobject/get coll ITER_SYMBOL) coll))

      (native-satisfies? ISeqable coll)
      (-seq coll)

      :else (throw (js/Error. (str coll " is not ISeqable"))))))