Usage
split!(l, f)
Signature
split!: (%,T Boolean)
(%,%)
Parameter | Type | Description |
---|---|---|
l | % | a list |
f | T ![]() |
a predicate |
Returns
Returns sublistsand
of l such that
is the list of elements of l for which f is true, and
is the list of elements of l for which f is false.
Remarks
split! does not make a copy of l, which is therefore destroyed after the call. No new list is created by split!, but the elements of l are relinked intoand
.