sublists -- process interspersed sublists of a list
Synopsis
Usage:
sublist(x,f,g,h)
Inputs:
x
f
g
h
Outputs:
a list of results obtained by applying g to each of the maximal nonempty lists of consecutive elements i of x for which f i is true, and by applying h to each of the elements i of x for which f i is false.
Description
If g or h is omitted, it is assumed to be the identity.