Difference between revisions of "Map type"
Jump to navigation
Jump to search
(Created page with "<c>map type</c> returns a map that represents the map datatype in MiniScript's core type system. See also: number; string; list; funcRef === Usage Notes ===...") |
m |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | <c>map | + | <c>map</c> returns a map that represents the map datatype in |
MiniScript's core type system. | MiniScript's core type system. | ||
− | See also: [[number]]; [[string]]; [[list]]; [[funcRef]] | + | See also: [[number type|number]]; [[string type|string]]; [[list type|list]]; [[funcRef]] |
=== Usage Notes === | === Usage Notes === | ||
Line 11: | Line 11: | ||
== Example == | == Example == | ||
− | <ms>{ | + | <ms>{"foo":42} isa map // returns 1</ms> |
[[Category:Intrinsic Functions]] | [[Category:Intrinsic Functions]] | ||
− |
Latest revision as of 22:13, 1 November 2020
map
returns a map that represents the map datatype in
MiniScript's core type system.
See also: number; string; list; funcRef
Usage Notes
map type
can be used with isa
to check whether a variable refers to a map. You can also
assign new methods here to make them available to all maps.
Example
{"foo":42} isa map // returns 1