match multimethod

Methods

match(a:Any, b:Any) Source: stdlib.ngs:7874
Used by match EXPR { ... } construct to check whether the expression matches the case. %AUTO match EXPR { ... }

Returns

a =~ b

Example

r = match x {
  Int  "Got integer"
  /^a/ "Got special string"
  Str  "Got regular string"
}