单词 | pattern matching |
释义 | pattern matchingpattern matchingpattern matching(1)length [] = 0length (x:xs) = 1 + length xs uses pattern matching in its argument to distinguish a nulllist from a non-null one. There are well known algorithm for translating patternmatching into conditional expressions such as "if" or "case".E.g. the above function could be transformed to length l = case l of[] -> 0x:xs -> 1 : length xs Pattern matching is usually performed in textual order thoughthere are languages which match more specific patterns beforeless specific ones. pattern matching(2) |
随便看 |
|
英语词典包含2567994条英英释义在线翻译词条,基本涵盖了全部常用单词的英英翻译及用法,是英语学习的有利工具。