store/[org.clojure/clojure "1.6.0"] clj::clojure.core/seq

Official Documentation

Add notes
Arities
==================================================
   [coll]

Docstring
==================================================
  Returns a seq on the collection. If the collection is
    empty, returns nil.  (seq nil) returns nil. seq also works on
    Strings, native Java arrays (of reference types) and any objects
    that implement Iterable.

Source

(def
 ^{:arglists '(^clojure.lang.ISeq [coll])
   :doc "Returns a seq on the collection. If the collection is
    empty, returns nil.  (seq nil) returns nil. seq also works on
    Strings, native Java arrays (of reference types) and any objects
    that implement Iterable."
   :tag clojure.lang.ISeq
   :added "1.0"
   :static true}
 seq (fn ^:static seq ^clojure.lang.ISeq [coll] (. clojure.lang.RT (seq coll))))

Example 1

Edit
(seq '())
;; => nil

(seq '(1))
;; => (1)

(seq "")
;; => nil

(seq "abc")
;; => (\a \b \c)

Example 2

Edit
;; (seq x) is the recommended idiom for testing if a collection is not empty
(every? seq ["1" [1] '(1) {:1 1} #{1}])
;; => true

Example 3

Edit
;; seq can be used to turn a map into a list of vectors
                                        ; notice how the list is built adding elements to the start of the list
                                        ; not to the end, like in vectors
(seq {:key1 "value1" :key2 "value2"})
;; => ([:key2 "value 2"] [:key1 "value 1"])

Uses on crossclj