Match: Difference between revisions

From The K Language Wiki
Content added Content deleted
(Created page with "{{primitive}} '''Match''' determines whether two values are equivalent, that is whether they are of the same type (types such as "16-bit int" and "32-bit int" may or may not b...")
 
No edit summary
Line 1: Line 1:
{{primitive}}
{{primitive|x~y}}
'''Match''' determines whether two values are equivalent, that is whether they are of the same type (types such as "16-bit int" and "32-bit int" may or may not be considered "the same", depending on dialect), have the same length, and consist of the same items (including prototypes, if the dialect supports them). Match always returns a boolean atom.
'''Match''' determines whether two values are equivalent, that is whether they are of the same type (types such as "16-bit int" and "32-bit int" may or may not be considered "the same", depending on dialect), have the same length, and consist of the same items (including prototypes, if the dialect supports them). Match always returns a boolean atom.

Revision as of 19:04, 8 July 2021

Match
x~y

Match determines whether two values are equivalent, that is whether they are of the same type (types such as "16-bit int" and "32-bit int" may or may not be considered "the same", depending on dialect), have the same length, and consist of the same items (including prototypes, if the dialect supports them). Match always returns a boolean atom.