% $Id: Filter2.oz,v 1.2 2007/11/14 02:08:24 leavens Exp leavens $ % Compare with Figure 5.20 and the discussion in 5.6.4 of CTM declare fun {Filter2 L F} for X in L collect: C do Slot in {C Slot} thread if {F X} then Slot=[X] else Slot=nil end end end end