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

NextPrevUpTopContentsIndex

split-sequence

Function
Summary

Returns a list of subsequences of a sequence, split at specified separator elements.

Package

lispworks

Signature

split-sequence separator-bag sequence &key start end test key coalesce-separators => sequences

Arguments

separator-bag

A sequence.

sequence

A sequence.

start, end

Bounding index designators for sequence .

test

A function designator.

key

A function designator or nil .

coalesce-separators

A generalized boolean.

Values

sequences

A list of sequences.

Description

The function split-sequence returns a list of subsequences of sequence (between start and end), split when an element in the sequence separator-bag is found. The structure of sequence is not changed and the elements matching separator-bag are not included in the resulting sequences.

The function test , which defaults to eql , is used to compare the elements of sequence and the elements of separator-bag .

If true, the function key , is applied to the elements of sequence before test is called.

If coalesce-separators is true, then empty sequences are removed.

See also

split-sequence-if


LispWorks User Guide and Reference Manual - 21 Dec 2011

NextPrevUpTopContentsIndex