vle-list-split


(vle-list-split  lst  item)

splits a list at a given item and returns both list parts

Arguments

lst  list to be splitted at 'item'

item  the data where 'lst' is to be splitted

Return

a list containing the "left" and the "right" sub-lists of input list lst; item is added to the "right" list, if present;
if item is not present in lst, the "right" list part is NIL

Example

(vle-list-split '(1 2 3 4 5) 3)  => '((1 2) (3 4 5))
(vle-list-split '(1 2 3 4 5) 8)  => '((1 2 3 4 5) nil)
(vle-list-split '(1 2 3 4 5) 1)  => '(NIL (1 2 3 4 5))

Alias


Remarks




©  Bricsys NV. All rights reserved.