name = 'pivoting/4' slug = 'split a list according to the pivot' description = '''\
pivoting(P, L, S, G)
: the list S
contains the elements of L
smaller or equal to P
, and the list G
contains the elements of L
greater than P
. The order of elements in S
and G
should be the same as in L
.
?- pivoting(4, [1,4,5,8,6,4,2], S, G). S = [1,4,4,2], G = [5,8,6].''' hint = {}