
上QQ阅读APP看书,第一时间看更新
Chaining functions
Now that we have the hang of it, let's chain a few filters together:
PrintCars("Foreign, Numeric, Toyota",
cars.Filter(ByForeign()).
Filter(ByHasNumber()).
Filter(ByMake("Toyota")))
You will see the following output:
Foreign, Numeric, Toyota
-----------------------
car: Toyota 86
car: Toyota RAV4