Difference between revisions of "List type"
Jump to navigation
Jump to search
(Created page with "<c>list type</c> returns a map that represents the list datatype in MiniScript's core type system. See also: number, string, map, funcRef === Arguments ===...") |
m |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | <c>list | + | The intrinsic function <c>list</c> returns a map that represents the [[List|list]] datatype in |
MiniScript's core type system. | MiniScript's core type system. | ||
Line 6: | Line 6: | ||
=== Usage Notes === | === Usage Notes === | ||
− | This can be used with [[isa]]to check whether a variable refers to a list. You can also assign new methods here to make them available to all lists. | + | This can be used with [[isa]] to check whether a variable refers to a list. You can also assign new methods here to make them available to all lists. |
== Example == | == Example == | ||
− | <ms>[1, 2, 3] isa list // returns 1 | + | <ms>[1, 2, 3] isa list // returns 1</ms> |
+ | |||
[[Category:Intrinsic Functions]] | [[Category:Intrinsic Functions]] | ||
− | |||
− |
Latest revision as of 22:10, 1 November 2020
The intrinsic function list
returns a map that represents the list datatype in
MiniScript's core type system.
See also: number, string, map, funcRef
Arguments
Usage Notes
This can be used with isa to check whether a variable refers to a list. You can also assign new methods here to make them available to all lists.
Example
[1, 2, 3] isa list // returns 1