-- partition fn xs: split a list into [passing, failing] using a predicate.
-- Cleaner than calling flt twice (once for keep, once for negated keep).
pos x:n>b;>x 0
split-pos xs:L n>L (L n);partition pos xs
even x:n>b;=(mod x 2) 0
split-even xs:L n>L (L n);partition even xs
-- Phase 2 PR3: partition now dispatches natively on every engine via
-- OP_CALL_DYN per element; no tree-bridge round-trip per callback.
-- run: split-pos [-1,2,-3,4]
-- out: [[2, 4], [-1, -3]]
-- run: split-even [1,2,3,4,5,6]
-- out: [[2, 4, 6], [1, 3, 5]]
-- run: split-pos []
-- out: [[], []]