Name

take-while

Usage

builtin-function

Syntax

(take-while predicate seq)
(take-while predicate)

Description

Returns items from seq while they satisfy the function predicate. The second form returns a transducer.

user > (take-while #(< %1 3) (series 10))
it: (1 2)