2023-02-18 18:43:05 +01:00
|
|
|
|
2023-02-19 04:57:32 +01:00
|
|
|
func main { int | with args ;
|
|
|
|
def thing
|
2023-02-18 18:43:05 +01:00
|
|
|
|
2023-02-19 04:57:32 +01:00
|
|
|
1 anew =thing
|
2023-02-18 18:43:05 +01:00
|
|
|
|
2023-02-19 04:57:32 +01:00
|
|
|
"hi" 0 thing:unwrap:set;
|
2023-02-18 18:43:05 +01:00
|
|
|
|
2023-02-19 04:57:32 +01:00
|
|
|
def thing2 thing:unwrap ChangingArray:new =thing2
|
2023-02-18 18:43:05 +01:00
|
|
|
|
2023-02-19 04:57:32 +01:00
|
|
|
"world" thing2:unwrap:push
|
2023-02-18 18:43:05 +01:00
|
|
|
|
2023-02-19 04:57:32 +01:00
|
|
|
def thing3 thing2:unwrap:array =thing3
|
2023-02-18 18:43:05 +01:00
|
|
|
|
2023-02-19 04:57:32 +01:00
|
|
|
0 thing3:unwrap:get println
|
|
|
|
1 thing3:unwrap:get println
|
2023-02-18 18:43:05 +01:00
|
|
|
|
2023-02-19 04:57:32 +01:00
|
|
|
def thingy
|
|
|
|
"heya1" =thingy
|
|
|
|
"thingy println" dyn-read call
|
2023-02-18 18:43:05 +01:00
|
|
|
|
2023-02-19 04:57:32 +01:00
|
|
|
"heya2" =thingy
|
|
|
|
{ |
|
|
|
|
thingy println
|
|
|
|
{ |
|
|
|
|
{ | with it ;
|
|
|
|
it println
|
|
|
|
} trace:foreach
|
|
|
|
} call
|
|
|
|
} call
|
2023-02-18 18:43:05 +01:00
|
|
|
|
2023-02-19 04:57:32 +01:00
|
|
|
100
|
2023-02-19 02:03:06 +01:00
|
|
|
}
|
|
|
|
|
2023-02-19 04:57:32 +01:00
|
|
|
{ | with it ;
|
|
|
|
it println
|
|
|
|
} trace:foreach
|