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

NextPrevUpTopContentsIndex

split-sequence-if-not

Function
Summary

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

Package

lispworks

Signature

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

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-not returns a list of subsequences of sequence (between start and end), split by where the function predicate returns false 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


LispWorks User Guide and Reference Manual - 21 Dec 2011

NextPrevUpTopContentsIndex