/** * intersection of two sets */ intersection = function(X: [a], sorted; Y: [b], sorted) { loop map (X -> x: a | exists(Y, x)) {x;}; }