Name

keep

Usage

builtin-function

Syntax

(keep func seq)
(keep func)

Description

Returns a lazy list containing the non-null values of func applied to elements of seq. The second form returns a transducer.

user 1 > (keep #(if (string? %1) (length %1)) '("aap" "noot" 3 4 5 "mies"))
it: ("aap" "noot" "mies")