ListTools
Split
split a list into an expression sequence of lists
Calling Sequence
Parameters
Description
Examples
Split(f, L, opts, ...)
Split[N](f, opt[1], ..., opt[N-1], L, opts, ...)
L
-
list
f
procedure
N
positive integer
opts
(optional) options to procedure f
The Split(f, L) function splits list L at positions where procedure f returns true. The value of procedure f is determined by the expression f⁡x evaluated for each element x of list L.
The Split(f, L, opts) function performs in a similar manner, except that the value of procedure f is determined by the expression f⁡x,opts.
If Split is indexed by a positive integer N, the expression f⁡opt1,...,optN−1,x,opts is evaluated for each list element x.
with⁡ListTools:
L≔a,,,bc,d,e,,,f
Split⁡`=`,L,,
a,bc,d,e,f
Digits≔5
Split⁡`>`,seq⁡sin⁡2.0⁢x,x=1..12,−12
,−0.75680,,−0.54402,−0.53657,,−0.75099,,−0.90558
Split2⁡verify,−12,seq⁡sin⁡2⁢x,x=1..12,less_than
,sin⁡4,,sin⁡10,sin⁡12,,sin⁡18,,sin⁡24
See Also
map
type[list]
Download Help Document