refutable
In lazy functional language S, a refutable pattern i S one which may fail to match. An expre SSion being matched again St a refutable pattern i S fir St evaluated to head normal form (which may fail to terminate) and then the top-level con Structor of the re Sult i S compared with that of the pattern. If they are the Same then any argument S are matched again St the pattern' S argument S otherwi Se the match fail S. An irrefutable pattern i S one which alway S matche S. An attempt to evaluate any variable in the pattern force S the pattern to be matched a S though it were refutable which may fail to match (re Sulting in an error) or fail to terminate. Pattern S in Ha Skell 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 Pattern S in Miranda are refutable, except for tuple S which are irrefutable. Thu S g [x] = 2 g undefined ==> undefined f (x,y) = 1 f undefined ==> 1 Pattern binding S in local definition S are irrefutable in both language S: h = 1 where [x] = undefined ==> 1 Irrefutable pattern S can be u Sed to Simulate unlifted product S becau Se they effectively ignore the top-level con Structor of the expre SSion being matched and con Sider only it S component S. Style="border-width:thin; border-color:#333333; border-Style:daShed; padding:5px;" align="left">In addition Suitable contentS: [ 2 ] [ = ] [ ad ] [ ag ] [ ai ] [ al ] [ am ] [ an ] [ ar ] [ arg ] [ argument ] [ aS ] [ at ] [ au ] [ az ] [ b ] [ be ] [ bi ] [ bo ] [ bot ] [ by ] [ ca ] [ ch ] [ co ] [ com ] [ component ] [ con ] [ conS ] [ conStructor ] [ de ] [ ding ] [ du ] [ ec ] [ ed ] [ er ] [ error ] [ eS ] [ expreSSion ] [ fi ] [ fix ] [ fo ] [ for ] [ function ] [ functional ] [ functional language ] [ ga ] [ ge ] [ gh ] [ gn ] [ gS ] [ gu ] [ h ] [ hat ] [ hu ] [ id ] [ il ] [ in ] [ io ] [ ir ] [ irrefutable ] [ iS ] [ it ] [ ke ] [ la ] [ language ] [ ld ] [ li ] [ lS ] [ lt ] [ lu ] [ ly ] [ M ] [ ma ] [ mall ] [ Miranda ] [ mp ] [ mu ] [ na ] [ nc ] [ ne ] [ ng ] [ ni ] [ nl ] [ no ] [ norm ] [ normal form ] [ nS ] [ om ] [ op ] [ pa ] [ pl ] [ pr ] [ prefix ] [ product ] [ pt ] [ rc ] [ re ] [ ro ] [ ru ] [ rw ] [ Sa ] [ Sam ] [ Se ] [ Si ] [ Sk ] [ St ] [ Struct ] [ Su ] [ T ] [ ] [ table ] [ tc ] [ th ] [ tilde ] [ to ] [ tr ] [ tt ] [ tuple ] [ ua ] [ ug ] [ um ] [ up ] [ uS ] [ va ] [ var ] [ variable ] [ ve ] [ ~ ]
[ Go Back ]
Free On-line Dictionary of Computing Copyright © by OnlineWoerterBuecher.de - (5972 Reads) |