Skip to content

clojure.core/next

View this page on ClojureDocs

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

Returns a seq of the items after the first. Calls seq on its argument. If there are no more items, returns nil.

Examples

by dpritchett on . May have evaluation errors.
by boxie on
by Dimagog on

Note by steveminer

(next aseq) === (seq (rest aseq))

When writing lazy sequence functions, you should use rest, not next.

See also


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