let filter p ra = let res = sempty ra.strategy in for i = 0 to ra.vlix do let el = unsafe_get ra i in if p el then add_one res el done; res