partition

[procedure] partition pred list

SRFI-1: Partitions the elements of list with predicate pred, and returns two values: the list of in-elements and the list of out-elements. The list is not disordered -- elements occur in the result lists in the same order as they occur in the argument list. The dynamic order in which the various applications of pred are made is not specified. One of the returned lists may share a common tail with the argument list.

See also partition!, filter, remove.

[generic] partition pred coll

Gauche extends this to take arbitrary collection (with gauche.collection module).