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 > (keep #(if (string? %1) (length %1)) '("aap" "noot" 3 4 5 "mies"))
it: (3 4 4)