Is there a quick way to split a list into two lists such that all the elements in the first satisfy a certain criteria (or predicate function) and the second list contains all the elements that fail this criteria.
Obviously there are the functions vl-remove-if and vl-remove-if-not, but this means using these one after the other on the same list, and is quite repetitive. So I wondered if there was a function to perform this task in one operation.
As an example to clarify my intentions:
Before:
(1 2 3 4 5 6 7 8 9)
Test Function:
(zerop (rem x 3))
Return:
((3 6 9) (1 2 4 5 7 8))
Thanks,
Lee