Skip to content

clojure.core/keep-indexed

View this page on ClojureDocs

Type: function Added: Clojure 1.2 Examples: 7 Runnable: 5
([f] [f coll])

Returns a lazy sequence of the non-nil results of (f index item). Note, this means false return values will be included. f must be free of side-effects. Returns a stateful transducer when no collection is provided.

Examples

by pkolloch on
by kumarshantanu on
by yasuto on . May have evaluation errors.
by PetrGlad on
by statcompute on . May have evaluation errors.
by gluer on
by kevinmungai on

See also


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