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.
Value of the constant.
Value of the constant. This is nominally of type Any
but actually is of the molecule's value type T
.
Represents molecules that have constant pattern matchers, such as
a(1)
. Constant pattern matchers are either literal values (Int
,String
,Symbol
, etc.) or special values such asNone
,Nil
,()
, as well asSome
,Left
,Right
,List
, and tuples of constant matchers.Value of the constant. This is nominally of type
Any
but actually is of the molecule's value typeT
.