All Manuals > LispWorks User Guide and Reference Manual > 40 The LISPWORKS Package

NextPrevUpTopContentsIndex

split-sequence-if

Function
Summary

Returns a list of subsequences of a sequence, split at elements for which a predicate returns true.

Package

lispworks

Signature

split-sequence-if predicate sequence &key start end key coalesce-separators => result

Arguments

predicate

A function designator.

sequence

A sequence.

start, end

Bounding index designators for sequence.

key

A function designator or nil.

coalesce-separators

A generalized boolean.

Values

result

A list of sequences.

Description

The function split-sequence-if returns a list of subsequences of sequence (between start and end), split by where the function predicate returns true for an element. The structure of sequence is not changed and the elements identified by the predicate are not included in the resulting sequences.

If non-nil, the function key is applied to the elements of sequence before predicate is called.

If coalesce-separators is true, then empty sequences are omitted from result.

See also

split-sequence
split-sequence-if-not


LispWorks User Guide and Reference Manual - 13 Feb 2015

NextPrevUpTopContentsIndex