(fn filter ($func @lst) (:= @ret (list)) (for $e in @lst (if (call $func $e) (:= @ret (cat $e @ret)) ) ) @ret )