Detect whether the input pattern is irrefutable and will always match any given value.
Detect whether the input pattern is irrefutable and will always match any given value. An irrefutable pattern does not constrain the input value but merely puts variables on the value or on its parts.
Examples of irrefutable patterns are a(_)
, a(x)
, and a( z@(x,y,_) )
, where a(...)
is a molecule with a suitable value type.
Examples of refutable patterns are a(1)
, a(Some(x))
, a( (_, None) )
.
true
if the pattern is irrefutable, false
otherwise.