Skip to content

clojure.core/seq

View this page on ClojureDocs

Type: function Added: Clojure 1.0 Examples: 5 Runnable: 5
([coll])

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. Note that seqs cache values, thus seq should not be used on any Iterable whose iterator repeatedly returns the same mutable object.

Examples

by devn on
by dansalmo on
by rafmagana on
by ertugrulcetin on
by bfontaine on

See also


Content from the matching ClojureDocs page, with authors credited on each contribution.