请输入您要查询的英文单词:

 

单词 pattern matching
释义

pattern matching


Translations

pattern matching


pattern matching

(1)A function is defined to take arguments of a particulartype, form or value. When applying the function to its actualarguments it is necessary to match the type, form or value ofthe actual arguments against the formal arguments in somedefinition. For example, the function

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)Descriptive of a type of language or utility such as awkor Perl which is suited to searching for strings or patternsin input data, usually using some kind of regular expression.
AcronymsSeepacemaker
随便看

 

英语词典包含2567994条英英释义在线翻译词条,基本涵盖了全部常用单词的英英翻译及用法,是英语学习的有利工具。

 

Copyright © 2004-2022 Newdu.com All Rights Reserved
更新时间:2025/3/3 5:17:26