Name

split-with

Usage

builtin-function

Syntax

(split-with predicate seq)

Description

Equivalent to (list (take-while predicate seq) (drop-while predicate seq)).

user > (split-with even? '(2 2 2 1 3 3 3))
it: ((2 2 2) (1 3 3 3))