翻訳と辞書
Words near each other
・ refined c
・ refined fortran
・ reflexive
・ reflexive domain
・ reflexive transitive closure
・ reflisp
・ refresh
・ refresh rate
・ refreshable braille display
・ refreshable display
refutable
・ reg-symbolic
・ regex
・ regexp
・ regina
・ regional network
・ register
・ register allocation
・ register assignment
・ register dancing


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

refutable : FOLDOC
refutable
In lazy functional languages, a refutable pattern is one which may fail to match. An expression being matched against a refutable pattern is first evaluated to head normal form (which may fail to terminate) and then the top-level constructor of the result is compared with that of the pattern. If they are the same then any arguments are matched against the pattern's arguments otherwise the match fails.
An irrefutable pattern is one which always matches. An attempt to evaluate any variable in the pattern forces the pattern to be matched as though it were refutable which may fail to match (resulting in an error) or fail to terminate.
Patterns in Haskell are normally refutable but may be made irrefutable by prefixing them with a tilde (~). For example,
( (x,y) -> 1) undefined ==> undefined
(
~(x,y) -> 1) undefined ==> 1

Patterns in Miranda are refutable, except for tuples which are irrefutable. Thus
g [x] = 2
g undefined ==> un


スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.