这种函数叫做 谓词函数 (predicate function)。这里有一个用伪代码(几乎就是Scala)编写的方法:
基于28个网页-相关网页
测试条件的真假(判定函数(predicate function); 工具函数(utility function,或帮助函数):
基于26个网页-相关网页
semi-predicate function 半谓词函数
The predicate function 谓词函数
·2,447,543篇论文数据,部分数据来源于NoteExpress
Notice that once again, we used a shorthand closure for the predicate function passed to the filter function.
请再次注意,我们为传递给filter函数的断言函数使用了一个简短的闭包。
youdao
Each element's index is used in the logic of the predicate function.
将在谓词函数的逻辑中使用每个元素的索引。
应用推荐
模块上移
模块下移
不移动