1
0
Fork 0
mirror of https://github.com/Reuh/anselme.git synced 2025-10-27 16:49:31 +00:00

Update tests

This commit is contained in:
Étienne Fildadut 2024-01-02 00:36:10 +01:00
parent a79b054bfb
commit a85e7ab0af
73 changed files with 246 additions and 157 deletions

View file

@ -0,0 +1,38 @@
local class = require("anselme.lib.class")
local ast = require("anselme.ast")
local Identifier
-- stack of resumable contexts
local calling_env_identifier, calling_env_symbol
local calling_environment_manager = class {
init = false,
push = function(self, state, calling_environment)
state.scope:push_partial(calling_env_identifier)
state.scope:define(calling_env_symbol, calling_environment)
end,
pop = function(self, state)
state.scope:pop()
end,
get_level = function(self, state, level)
local env = state.scope:capture()
while level > 0 do
assert(env:defined(state, calling_env_identifier), "no calling function")
env = env:get(state, calling_env_identifier)
level = level - 1
end
return env
end,
}
package.loaded[...] = calling_environment_manager
Identifier = ast.Identifier
calling_env_identifier = Identifier:new("_calling_environment")
calling_env_symbol = calling_env_identifier:to_symbol()
return calling_environment_manager

View file

@ -4,7 +4,7 @@
--- text ---
| {}"" {}"type(\"kg\", 12)" {}"" |
--- error ---
type check failure for weigh; 32 does not satisfy ($(x) type(x) == t)
type check failure for weigh; 32 does not satisfy $(x) type(x) == t
↳ from test/tests/constrained variable assignement.ans:9:7 in assignment: weigh = 32
↳ from ? in block: :weigh::is("kg") = type(5, "kg")…
--# saved #--

View file

@ -0,0 +1,7 @@
--# run #--
--- text ---
| {}"ok" |
--- return ---
()
--# saved #--
{"fn.checkpoint":false, "fn.run":1}

View file

@ -5,7 +5,7 @@
--- text ---
| {}"" {}"42" {}"" |
--- error ---
identifier "z" is undefined in branch 1228bcf1-5118-4955-10048-8fda790007be
identifier "z" is undefined in branch cf017f8a-7c86-4871-109af-6658231331e6
↳ from test/tests/exported variable nested.ans:12:3 in identifier: z
↳ from test/tests/exported variable nested.ans:12:1 in text interpolation: | {z} |
↳ from test/tests/exported variable nested.ans:12:1 in translatable: | {z} |

View file

@ -1,6 +1,6 @@
--# run #--
--- error ---
can't call closure ($(a, b) _): expected 2 arguments, received 1
can't call function $(a, b) _: expected 2 arguments, received 1
↳ from test/tests/function args arity check fail.ans:4:2 in call: f("ok")
↳ from ? in block: :f = ($(a, b) _)…
--# saved #--

View file

@ -2,14 +2,14 @@
--- text ---
| {}"c" |
--- text ---
| {}"a" |
--- text ---
| {}"c" |
| {}"b" |
--- text ---
| {}"a" |
--- text ---
| {}"b" |
--- text ---
| {}"b" |
--- return ---
()
--# saved #--
{"a.checkpoint":false, "a.run":2, "b.checkpoint":false, "b.run":1, "c.checkpoint":false, "c.run":2}
{"a.checkpoint":false, "a.run":1, "b.checkpoint":false, "b.run":3, "c.checkpoint":false, "c.run":1}

View file

@ -1,6 +1,6 @@
--# run #--
--- error ---
identifier "b" is undefined in branch 57b4c67d-b128-4b9a-11e39-0e6612f1210e
identifier "b" is undefined in branch cf017f8a-7c86-4871-109af-6658231331e6
↳ from test/tests/function scope wrong.ans:4:7 in identifier: b
↳ from test/tests/function scope wrong.ans:4:1 in text interpolation: | a: {b} |
↳ from test/tests/function scope wrong.ans:4:1 in translatable: | a: {b} |

View file

@ -34,8 +34,8 @@
| {}"" {}"\"d\":[]" {}"" |
--- text ---
| {}"function:" |
| {}"" {}"($() 12)" {}"" |
| {}"" {}"($(x) x)" {}"" |
| {}"" {}"$() 12" {}"" |
| {}"" {}"$(x) x" {}"" |
--- return ---
()
--# saved #--

View file

@ -1,25 +1,21 @@
--# run #--
--- error ---
abort
abort
↳ from test/tests/merge nested mutable error bis.ans:14:7 in call: error("abort")
↳ from test/tests/merge nested mutable error bis.ans:3:1 in block: insert(a, b)…
↳ from test/tests/merge nested mutable error bis.ans:3:18 in call: _
↳ from test/tests/merge nested mutable error bis.ans:3:17 in return boundary: _
↳ from test/tests/merge nested mutable error bis.ans:3:17 in return boundary: _
↳ from script.ans:29:6 in call: fn!
↳ from script.ans:27:3 in block: resumed from = ()…
↳ from script.ans:27:5 in call: _
↳ from script.ans:27:3 in call: ~_
↳ from script.ans:27:3 in partial scope: ~_…
↳ from script.ans:23:2 in block: fn . "current checkpoint" ~…
↳ from script.ans:27:7 in call: else!
↳ from script.ans:27:3 in partial scope: else!…
↳ from script.ans:23:2 in block: if(fn . "current checkpoint")…
↳ from script.ans:23:9 in call: _
↳ from script.ans:23:7 in return boundary: _
↳ from script.ans:23:7 in return boundary: _
↳ from script.ans:37:9 in call: value(s)!
↳ from script.ans:36:1 in block: value(s)!
↳ from script.ans:36:20 in call: _
↳ from script.ans:36:1 in return boundary: _
↳ from script.ans:36:1 in return boundary: _
↳ from test/tests/merge nested mutable error bis.ans:19:2 in call: f!
↳ from ? in block: :a = *[1]…
--# post run check #--

View file

@ -1,25 +1,21 @@
--# run #--
--- error ---
abort
abort
↳ from test/tests/merge nested mutable error.ans:14:7 in call: error("abort")
↳ from test/tests/merge nested mutable error.ans:3:1 in block: insert(a, b)…
↳ from test/tests/merge nested mutable error.ans:3:18 in call: _
↳ from test/tests/merge nested mutable error.ans:3:17 in return boundary: _
↳ from test/tests/merge nested mutable error.ans:3:17 in return boundary: _
↳ from script.ans:29:6 in call: fn!
↳ from script.ans:27:3 in block: resumed from = ()…
↳ from script.ans:27:5 in call: _
↳ from script.ans:27:3 in call: ~_
↳ from script.ans:27:3 in partial scope: ~_…
↳ from script.ans:23:2 in block: fn . "current checkpoint" ~…
↳ from script.ans:27:7 in call: else!
↳ from script.ans:27:3 in partial scope: else!…
↳ from script.ans:23:2 in block: if(fn . "current checkpoint")…
↳ from script.ans:23:9 in call: _
↳ from script.ans:23:7 in return boundary: _
↳ from script.ans:23:7 in return boundary: _
↳ from script.ans:37:9 in call: value(s)!
↳ from script.ans:36:1 in block: value(s)!
↳ from script.ans:36:20 in call: _
↳ from script.ans:36:1 in return boundary: _
↳ from script.ans:36:1 in return boundary: _
↳ from test/tests/merge nested mutable error.ans:19:2 in call: f!
↳ from ? in block: :a = *[1]…
--# post run check #--

View file

@ -14,21 +14,18 @@
--- text ---
| {}"CHECK 2" |
--- error ---
t
t
↳ from test/tests/scope checkpoint mutable bis error.ans:32:7 in call: error("t")
↳ from test/tests/scope checkpoint mutable bis error.ans:7:1 in block: insert(t, len(l) + 1)…
↳ from test/tests/scope checkpoint mutable bis error.ans:7:8 in call: _
↳ from test/tests/scope checkpoint mutable bis error.ans:7:1 in return boundary: _
↳ from test/tests/scope checkpoint mutable bis error.ans:7:1 in return boundary: _
↳ from test/tests/scope checkpoint mutable bis error.ans:19:4 in call: f(t)
↳ from test/tests/scope checkpoint mutable bis error.ans:15:2 in block: | REC |…
↳ from test/tests/scope checkpoint mutable bis error.ans:15:10 in call: _
↳ from test/tests/scope checkpoint mutable bis error.ans:15:8 in call: n < 1 ~ _
↳ from test/tests/scope checkpoint mutable bis error.ans:15:2 in partial scope: n < 1 ~…
↳ from test/tests/scope checkpoint mutable bis error.ans:15:4 in call: if(n < 1)
↳ from test/tests/scope checkpoint mutable bis error.ans:15:2 in partial scope: if(n < 1)…
↳ from test/tests/scope checkpoint mutable bis error.ans:7:1 in block: insert(t, len(l) + 1)…
↳ from test/tests/scope checkpoint mutable bis error.ans:7:8 in call: _
↳ from test/tests/scope checkpoint mutable bis error.ans:7:1 in return boundary: _
↳ from test/tests/scope checkpoint mutable bis error.ans:7:1 in return boundary: _
↳ from test/tests/scope checkpoint mutable bis error.ans:41:2 in call: f(l)
↳ from ? in block: :x = *[99]…
--# post run check #--

View file

@ -10,21 +10,18 @@
--- text ---
| {}"CHECK" |
--- error ---
t
t
↳ from test/tests/scope checkpoint mutable error.ans:23:7 in call: error("t")
↳ from test/tests/scope checkpoint mutable error.ans:5:1 in block: insert(t, len(l) + 1)…
↳ from test/tests/scope checkpoint mutable error.ans:5:8 in call: _
↳ from test/tests/scope checkpoint mutable error.ans:5:1 in return boundary: _
↳ from test/tests/scope checkpoint mutable error.ans:5:1 in return boundary: _
↳ from test/tests/scope checkpoint mutable error.ans:17:4 in call: f(t)
↳ from test/tests/scope checkpoint mutable error.ans:13:2 in block: | REC |…
↳ from test/tests/scope checkpoint mutable error.ans:13:10 in call: _
↳ from test/tests/scope checkpoint mutable error.ans:13:8 in call: n < 1 ~ _
↳ from test/tests/scope checkpoint mutable error.ans:13:2 in partial scope: n < 1 ~…
↳ from test/tests/scope checkpoint mutable error.ans:13:4 in call: if(n < 1)
↳ from test/tests/scope checkpoint mutable error.ans:13:2 in partial scope: if(n < 1)…
↳ from test/tests/scope checkpoint mutable error.ans:5:1 in block: insert(t, len(l) + 1)…
↳ from test/tests/scope checkpoint mutable error.ans:5:8 in call: _
↳ from test/tests/scope checkpoint mutable error.ans:5:1 in return boundary: _
↳ from test/tests/scope checkpoint mutable error.ans:5:1 in return boundary: _
↳ from test/tests/scope checkpoint mutable error.ans:32:2 in call: f(l)
↳ from ? in block: :l = *[1]…
--# post run check #--

View file

@ -14,21 +14,18 @@
--- text ---
| {}"CHECK 2" |
--- error ---
t
t
↳ from test/tests/scope checkpoint mutable ter error.ans:34:7 in call: error("t")
↳ from test/tests/scope checkpoint mutable ter error.ans:7:1 in block: insert(t, len(l) + 1)…
↳ from test/tests/scope checkpoint mutable ter error.ans:7:8 in call: _
↳ from test/tests/scope checkpoint mutable ter error.ans:7:1 in return boundary: _
↳ from test/tests/scope checkpoint mutable ter error.ans:7:1 in return boundary: _
↳ from test/tests/scope checkpoint mutable ter error.ans:19:4 in call: f(t)
↳ from test/tests/scope checkpoint mutable ter error.ans:15:2 in block: | REC |…
↳ from test/tests/scope checkpoint mutable ter error.ans:15:10 in call: _
↳ from test/tests/scope checkpoint mutable ter error.ans:15:8 in call: n < 1 ~ _
↳ from test/tests/scope checkpoint mutable ter error.ans:15:2 in partial scope: n < 1 ~…
↳ from test/tests/scope checkpoint mutable ter error.ans:15:4 in call: if(n < 1)
↳ from test/tests/scope checkpoint mutable ter error.ans:15:2 in partial scope: if(n < 1)…
↳ from test/tests/scope checkpoint mutable ter error.ans:7:1 in block: insert(t, len(l) + 1)…
↳ from test/tests/scope checkpoint mutable ter error.ans:7:8 in call: _
↳ from test/tests/scope checkpoint mutable ter error.ans:7:1 in return boundary: _
↳ from test/tests/scope checkpoint mutable ter error.ans:7:1 in return boundary: _
↳ from test/tests/scope checkpoint mutable ter error.ans:43:2 in call: f(l)
↳ from ? in block: :x = *[99]…
--# post run check #--

View file

@ -2,6 +2,6 @@
--- text ---
| {1:1}"lol" |
--- return ---
@| {}"a " {1:2}"d" {}" " {1:3}"t" {}" b" |
| {}"a " {1:2}"d" {}" " {1:3}"t" {}" b" |
--# saved #--
{}

View file

@ -2,6 +2,6 @@
--- text ---
| {}"lol" |
--- return ---
@| {}"a " {}"d" {}" b" |
| {}"a " {}"d" {}" b" |
--# saved #--
{}

View file

@ -0,0 +1,19 @@
--# run #--
--- text ---
| {}"" {}"0" {}"" |
--- text ---
| {}"" {}"1" {}"" |
--- text ---
| {}"" {}"2" {}"" |
--- text ---
| {}"" {}"3" {}"" |
--- text ---
| {}"" {}"4" {}"" |
--- text ---
| {}"" {}"5" {}"" |
--- text ---
| {}"ok" |
--- return ---
()
--# saved #--
{}

View file

@ -0,0 +1,17 @@
--# run #--
--- text ---
| {}"" {}"1" {}"" |
--- text ---
| {}"" {}"2" {}"" |
--- text ---
| {}"" {}"4" {}"" |
--- text ---
| {}"" {}"5" {}"" |
--- text ---
| {}"" {}"6" {}"" |
--- text ---
| {}"ok" |
--- return ---
()
--# saved #--
{}

View file

@ -36,6 +36,6 @@
--- text ---
| {}"" {}"5" {}"" |
--- return ---
@()
()
--# saved #--
{}

View file

@ -1,8 +1,8 @@
:$ a - b
@"generic minus"
return("generic minus")
:$ a::string - b::string
@a + " minus " + b
return(a + " minus " + b)
| {2-5}

View file

@ -3,7 +3,7 @@
:$ jump button
1 # |A
| Suprise choice! |> ()
@"JOIN"
return("JOIN")
| Press {jump button!} to jump. |>
|ok

View file

@ -3,7 +3,7 @@
:$ jump button
1 # | a
@"SPLIT"
return("SPLIT")
| Press {jump button!} to jump. |>
| ok

View file

@ -1,9 +1,9 @@
:$ jump button
@1 # | A
return(1 # | A)
:$ move axis
1 # | left
@" joystick"
return(" joystick")
| Press {jump button!} to jump. |>
|ok

View file

@ -1,16 +1,17 @@
1 ~ | a |>
if(1)
| a |>
| -> a
| b |>
| -> b
:@choice = 1
1 ~ | a |>
if(1, $| a |> _)
| -> a
| b |>
| -> b
choice = 2
() ~ | a |>
if((), $| a |> _)
| -> a
| b |>
| -> b
@ -22,13 +23,13 @@ choice = 1
| -> b
choice = 2
12 # () ~ | a |>
12 # if((), $| a |> _)
| -> a
3 # | b |>
| -> b
choice = 1
12 # 1 ~ | a |>
12 # if(1, $| a |> _)
| -> a
3 # | b |>
| -> b

View file

@ -1,3 +1,3 @@
() ~ |ko
1 ~ |ok
1 ~ |ok bis
if((), $|ko)
if(1, $|ok)
if(1, $|ok bis)

View file

@ -1,6 +1,6 @@
:a = 5
a == 2 ~
if(a == 2)
|ko
~
else!
|ok

View file

@ -1,6 +1,6 @@
:a = 5
a == 5 ~
if(a == 5)
|ok
~
else!
|ko

View file

@ -1,8 +1,8 @@
:a = 5
a == 2 ~
if(a == 2)
|ko
~ () ~
else if(())
|ko
~
else!
|ok

View file

@ -1,8 +1,8 @@
:a = 5
a == 2 ~
if(a == 2)
|ko
~ 1 ~
else if(1)
|ok
~
else!
|ko

View file

@ -1,4 +1,4 @@
:a = 5
a == 2 ~
if(a == 2)
|ko

View file

@ -1,6 +1,6 @@
:$ f
@|b
return(|b)
|a {5 ~ f!} c
|a {if(5, f)} c
|a {() ~ f!} c
|a {if((), f)} c

View file

@ -1,4 +1,4 @@
:a = 5
a == 5 ~
if(a == 5)
|ok

View file

@ -2,10 +2,10 @@
:$ format(p::is(person))
p = p!value
@"Name: {p("name")}\nAge: {p("age")}"
return("Name: {p("name")}\nAge: {p("age")}")
:$ Person(name, age)
@{"name":name, "age":age}!type(person)
return({"name":name, "age":age}!type(person))
:abject = Person("Darmanin", 38)

View file

@ -0,0 +1,4 @@
:fn = "fn"!script
|ok
fn!

View file

@ -1,7 +1,7 @@
:a = 5
:$ f(p)
@a
return(a)
:$ f(p) = v
|v={v}

View file

@ -1,7 +1,7 @@
:f = $(x)x*x
:$g(x)
@x*x
return(x*x)
|{f(5)} = {g(5)}

View file

@ -1,8 +1,8 @@
:$ hey
:@$ foo
@2
@3
@5
return(2)
return(3)
return(5)
|u
|{hey!}

View file

@ -1,6 +1,6 @@
:$ hey
@5
return(5)
|a
@2
return(2)
|{hey!}

View file

@ -1,7 +1,7 @@
:$ hey
:@$ foo
@2
@5
return(2)
return(5)
|{hey!}
|{hey.foo!}

View file

@ -1,4 +1,4 @@
:$ hey
@5
return(5)
|{hey!}

View file

@ -11,7 +11,7 @@
|before recursion {c}: {a}
n < 5 ~
if(n < 5)
f(c+1)
|after recursion {c}: {a}
@ -29,7 +29,7 @@ f!
|before recursion {c}: {a}
n < 5 ~
if(n < 5)
g(c+1, a)
|after recursion {c}: {a}

View file

@ -11,7 +11,7 @@
|before recursion {c}: {a}
n < 5 ~
if(n < 5)
f(c+1)
|after recursion {c}: {a}

View file

@ -1,9 +1,9 @@
:$ a(x::number)
@x + 2
return(x + 2)
:$ x
:$ a(x::string)
@x + "heh"
return(x + "heh")
|{a("plop")}

View file

@ -11,10 +11,10 @@ fn(5)
fn()
:$ g(n="s", a::number=5)
@"gn"
return("gn")
:$ g(n="s", a::string="lol")
@"gs"
return("gs")
|{g(n="k", a="l")}
|{g(n="k", a=1)}

View file

@ -1,10 +1,10 @@
:$ a
|a
@1
return(1)
:$ b
|b
@()
return(())
|{a! & b!} = a b ()

View file

@ -1,5 +1,5 @@
:i = 0
(i += 1; i <= 10) ~? (| {i}\n)!
while($()(i += 1; i <= 10), $| {i}\n |!)
|{i}

View file

@ -1,4 +1,4 @@
:$ f(a, b, c)
@a + b + c
return(a + b + c)
|{f("a", "b", "c")} = {f(a="a", b="b", c="c")} = {f(c="c", a="a", b="b")}

View file

@ -1,19 +1,19 @@
1 ~
if(1)
|yes
() ~
if(())
|no
~
else!
|nope
1 ~
if(1)
|niet
() ~
if(())
|still no
~
else!
|nein
() ~
if(())
|nah
~
else!
|ye
~
else!
|da

View file

@ -1,18 +1,18 @@
1 ~
if(1)
|a
|b
1 ~
if(1)
|c
|d
1 ~
if(1)
|e
| f |> ()
:@choice = 1
1 ~
if(1)
|g
| h |> ()

View file

@ -1,4 +1,4 @@
:$ f(a, b, c="c")
@a + b + c
return(a + b + c)
|{f("a", "b")} = {f("a", "b", "c")} = {f(b="b", a="a")}

View file

@ -1,7 +1,7 @@
:f = "f"!script($_)
:f = "f"!script
"a":"a" #
|a
1 ~ "x":"x" #
if(1, $()("x":"x" # _))
"b":"b" #
#p!checkpoint($_)
"c":"c"# |b

View file

@ -45,7 +45,7 @@ g!
g!from(#p)
:h = "h"!script($_)
1 ~
if(1)
| a |>
|-> a
#p!checkpoint
@ -76,7 +76,7 @@ h!from(#p)
|-> ab
| b |>
|-> b
1 ~
if(1)
| c |>
|-> c

View file

@ -1,8 +1,8 @@
:f = "f"!script($_)
1 ~
if(1)
#p!checkpoint
|x
~
else!
|y
f!
@ -10,10 +10,10 @@ f!
f!from(#p)
:g = "g"!script($_)
() ~
if(())
#p!checkpoint
|x
~
else!
|y
g!

View file

@ -1,13 +1,13 @@
:$ fn
:i=0
@
return(_)
i=50
i
| {fn!} = 50
:$ g
@
@3
return(_)
return(3)
| {g!} = 3

View file

@ -1,10 +1,10 @@
:$ f
| a |>
| x
@1
return(1)
| y
@2
return(2)
f! == 2 ~
if(f! == 2)
:@choice = 1
| Yes.

View file

@ -12,7 +12,7 @@
|CHECK
merge branch!
n < 1 ~
if(n < 1)
|REC
n += 1

View file

@ -12,7 +12,7 @@
|CHECK
merge branch!
n < 1 ~
if(n < 1)
|REC
n += 1

View file

@ -10,7 +10,7 @@
|CHECK
merge branch!
n < 1 ~
if(n < 1)
|REC
n += 1

View file

@ -12,7 +12,7 @@
|CHECK
merge branch!
n < 1 ~
if(n < 1)
|REC
n += 1

View file

@ -12,7 +12,7 @@
|CHECK
merge branch!
n < 1 ~
if(n < 1)
|REC
n += 1

View file

@ -10,7 +10,7 @@
|CHECK
merge branch!
n < 1 ~
if(n < 1)
|REC
n += 1

View file

@ -1,4 +1,4 @@
1 #
|foo
1 ~ "b":[1,2] #
1 ~ "a":[2,3] # | bar
if(1, $()("b":[1,2] # _))
if(1, $()("a":[2,3] # | bar))

View file

@ -1,5 +1,5 @@
:$ f
@"b"
return("b")
|a {5 # |{f!}} c

View file

@ -1,8 +1,8 @@
:$ f
1 # | lol
@2 # |d
return(2 # |d)
:a = |a {f!} {3#|t} b
@a
return(a)

View file

@ -1,8 +1,8 @@
:$ f
|lol
@|d
return(|d)
:a = |a {f!} b
@a
return(a)

View file

@ -9,7 +9,7 @@
1 # | left
| Surprise choice! |>
| ok2
@" joystick"
return(" joystick")
| Press {jump button!} to jump.

View file

@ -1,12 +1,12 @@
:$ jump button
1 # | A
@
return!
:$ move axis
1 # | left
@" joystick"
return(" joystick")
| Press {jump button!} to jump.

View file

@ -1,9 +1,9 @@
:$ jump button
@1 # | A
return(1 # | A)
:$ move axis
2 # | left
@" joystick"
return(" joystick")
| Press {jump button!} to jump.

View file

@ -1,8 +1,8 @@
:$ -f
@"generic minus"
return("generic minus")
:$ -f::string
@"minus "+f
return("minus "+f)
|{-5}

View file

@ -1,6 +1,6 @@
: x = "x"!script($_)
|a
run == 0 ~ |seen only once
if(run == 0, $|seen only once)
|b
x!

View file

@ -0,0 +1,10 @@
:i = 0
while($i <= 10)
| {i}
if(i == 5)
break!
i += 1
|ok

View file

@ -0,0 +1,10 @@
:i = 0
while($i <= 5)
i += 1
if(i == 3)
continue!
| {i}
|ok

View file

@ -2,18 +2,18 @@
| Start with i={i}:
i < 5 ~?
while($i < 5)
| {i}
i += 1
~
else!
| Loop not ran.
| Start with i={i}:
i < 5 ~?
while($i < 5)
| {i}
i += 1
~
else!
| Loop not ran.

View file

@ -1,5 +1,5 @@
:i = 0
i <= 10 ~?
while($i <= 10)
| {i}
i += 1
@ -7,10 +7,10 @@ i <= 10 ~?
| return in loop:
i = 0
i <= 10 ~?
while($i <= 10)
| {i}
i == 5 ~
@()
if(i == 5)
return!
i += 1