The next two lines use pattern matching to pick off the values required to enforce this rule when the returned function is actually executed.
接下来两行用模式匹配摘出实施规则所必需的数据。
Now look at the search function. This function USES one of the most powerful features of Scala, its pattern matching.
现在参看搜索函数,这个函数使用一个功能最强大的scala特性:模式匹配。
Pattern matching is used to evaluate the arguments to the function, so if you supply a tuple with three elements to the mathexp() function, the pattern matching will fail.
使用模式匹配评估函数的参数,所以如果把包含三个元素的元组提供给mathexp() 函数,模式匹配会失败。
This function is not smart enough to identify the character values in the final example of use and thus be able to warn the user. You could use a string pattern matching test such as.
这个函数还不够灵巧,不能区分最后使用的示例中的字符值,所以不能警告用户。
Next, we need an evaluation function that will take the AST and evaluate it to a numerical value. This is pretty straightforward to write, given the power of pattern matching.
接下来,我们需要一个求值函数,它将会获取AST,并求出它的数字值。
Finally, a newly pattern matching algorithm is suggested and the idea behind algorithm is partition and uses of hash function after analyzing the basic algorithm.
最后在分析基本检测算法的基础上,给出一种基于划分思想和哈希方法新的深度包检测算法。
Finally, a newly pattern matching algorithm is suggested and the idea behind algorithm is partition and uses of hash function after analyzing the basic algorithm.
最后在分析基本检测算法的基础上,给出一种基于划分思想和哈希方法新的深度包检测算法。
应用推荐