Thanks to Scala's syntactic flexibility, you can call the filter method the same way you call an operator.
由于Scala的语法非常灵活,所以您可以像调用一个运算符一样调用filter方法。
Using the ability to pass code as a parameter (as to the filter method in Listing 3) illustrates thinking about code reuse in a different way.
我使用这种功能将代码作为参数进行传递(清单3中的filter方法),展示一种不同的代码重用思维。
The test shows that the filter method is more effective to the processing of quadruped robot attitude data.
试验表明该滤波方法对四足机器人姿态感知数据的处理非常有效。
But the filter method avoids the error caused by truncated data and it can achieve the analysis of a fixed percentage bandwidth easily.
采用滤波法进行功率谱分析,不存在数据截断带来的误差,还可方便地用于等百分比带宽的谱分析。
The filter method in Listing 9 accepts a list and a criteria (a code block specifying how to filter the list) and iterates over the list, adding each item to a new list if it matches the predicate.
清单9中的filter方法接受了一个list和一个criteria(指定如何过滤列表的代码块)并对列表进行遍历,将满足谓语的项添加到一个新列表中。
The filter() method first checks to see if the list is empty — the critically important exit condition for this method.
filter()方法首先检查列表是否为空,这是该方法的重要退出条件。
The filter() method first checks to see if the list is empty — the critically important exit condition for this method.
filter()方法首先检查列表是否为空,这是该方法的重要退出条件。
应用推荐