Category talk:Wren-dynamic: Difference between revisions
m
Fixed syntax highlighting.
(→Source code: Added 2 new methods to Enum and Flags classes. Removed redundant Flags.indexOf method.) |
m (Fixed syntax highlighting.) |
||
Line 13:
To create for example a Point tuple, one could proceed as follows:
<
var Point = Tuple.create("Point", ["x", "y"])
var p = Point.new(1, 2)
System.print([p.x, p.y, p]) // [1, 2, (1, 2)]</
More complicated cases than these are best dealt with by manual programming as at present.
===Source code===
<
import "meta" for Meta
Line 254:
"abcdefghijklmnopqrstuvwxyz".toList,
97
)</
|