list_partition.pl
Stable list partitioning shared by promotion and register selection. Trealla's library(lists) supplies include/3 and exclude/3, but not SWI's partition/4. Evaluate the predicate only once per element.
partition:Predicate, +List, -Included, -Excludeddet
Included and Excluded retain List's order. Each element goes into Included if Predicate succeeds once, and into Excluded otherwise.
11partition_, [], [], []