mirror of
https://github.com/Reuh/anselme.git
synced 2025-10-28 00:59:31 +00:00
Preprend every definition line type with a colon, remove function decorator, add immediately ran definition line
This commit is contained in:
parent
7b756ad092
commit
d1f49d1894
117 changed files with 686 additions and 658 deletions
|
|
@ -1,4 +1,4 @@
|
|||
$ f(str: foo)
|
||||
:$ f(str: foo)
|
||||
@str + foo
|
||||
|
||||
{f("bi")} = {f(foo="bi")}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
$ _-_(a, b)
|
||||
:$ _-_(a, b)
|
||||
@"generic minus"
|
||||
|
||||
$ _-_(a::string, b::string)
|
||||
:$ _-_(a::string, b::string)
|
||||
@a + " minus " + b
|
||||
|
||||
{2-5}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
$ f
|
||||
:$ f
|
||||
x
|
||||
§ p
|
||||
:! p
|
||||
a
|
||||
|
||||
§ q
|
||||
:! q
|
||||
b
|
||||
|
||||
c
|
||||
|
|
|
|||
|
|
@ -8,13 +8,13 @@
|
|||
|
||||
1,2,3: {l}
|
||||
|
||||
§ a
|
||||
:! a
|
||||
|
||||
~ l!insert(4)
|
||||
|
||||
1,2,3,4: {l}
|
||||
|
||||
§ b
|
||||
:! b
|
||||
|
||||
~ l!insert(5)
|
||||
|
||||
|
|
@ -22,5 +22,5 @@
|
|||
|
||||
~ error("cancel merge")
|
||||
|
||||
$ after error
|
||||
:$ after error
|
||||
1,2,3,4: {l}
|
||||
|
|
|
|||
|
|
@ -8,13 +8,13 @@
|
|||
|
||||
2: {l}
|
||||
|
||||
§ a
|
||||
:! a
|
||||
|
||||
~ l := 3
|
||||
|
||||
3: {l}
|
||||
|
||||
§ b
|
||||
:! b
|
||||
|
||||
~ l := 4
|
||||
|
||||
|
|
@ -22,5 +22,5 @@
|
|||
|
||||
~ error("cancel merge")
|
||||
|
||||
$ after error
|
||||
:$ after error
|
||||
3: {l}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
§ p
|
||||
:! p
|
||||
seen!
|
||||
|
||||
Seen: {p.seen}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
$ f
|
||||
:$ f
|
||||
> neol
|
||||
nah
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
> No
|
||||
ko
|
||||
|
||||
$ jump button
|
||||
:$ jump button
|
||||
A # 1
|
||||
> Suprise choice!
|
||||
@"JOIN"
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
> No
|
||||
ko
|
||||
|
||||
$ jump button
|
||||
:$ jump button
|
||||
A # 1
|
||||
|
||||
@"SPLIT"
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
ko
|
||||
~ choose(1)
|
||||
|
||||
$ jump button
|
||||
:$ jump button
|
||||
A # 1
|
||||
|
||||
> Other
|
||||
|
|
@ -13,6 +13,6 @@ $ jump button
|
|||
ok
|
||||
~ choose(2)
|
||||
|
||||
$ move axis
|
||||
:$ move axis
|
||||
left # 1
|
||||
@" joystick"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
$ f
|
||||
:$ f
|
||||
# 42
|
||||
> a
|
||||
b
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
$ bar
|
||||
:$ bar
|
||||
:var=5
|
||||
|
||||
~ var := 2
|
||||
|
|
@ -7,14 +7,14 @@ $ bar
|
|||
|
||||
~ run("parallel")
|
||||
|
||||
§ foo
|
||||
:! foo
|
||||
checkpoint
|
||||
|
||||
after: {var}
|
||||
|
||||
~ run("parallel")
|
||||
|
||||
$ parallel
|
||||
:$ parallel
|
||||
parallel: {bar.var}
|
||||
|
||||
~ bar
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
$ f
|
||||
:$ f
|
||||
b
|
||||
|
||||
a {f ~ 5} c
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
% obj
|
||||
:% obj
|
||||
::a = 12
|
||||
|
||||
:x = obj()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
% obj
|
||||
:% obj
|
||||
:a = 12
|
||||
|
||||
::x = obj()
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
:person = "personne"
|
||||
|
||||
$ Person(name, age)
|
||||
:$ Person(name, age)
|
||||
@{name=name, age=age}::person
|
||||
|
||||
:abject = Person("Darmanin", 38)
|
||||
|
||||
{abject}
|
||||
|
||||
$ {}(p::person)
|
||||
:$ {}(p::person)
|
||||
@"Name: {p("name")}\nAge: {p("age")}"
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
$ a
|
||||
:$ a
|
||||
|
||||
:a = 2
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
:a = 2
|
||||
|
||||
$ a
|
||||
:$ a
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
$ f : test
|
||||
:$ f : test
|
||||
@"ok"
|
||||
|
||||
{f} = {test}
|
||||
|
||||
$ g : bis(a)
|
||||
:$ g : bis(a)
|
||||
@a
|
||||
|
||||
{g("ye")} = {bis("ye")}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
$ f(a, l...)
|
||||
:$ f(a, l...)
|
||||
{a}
|
||||
{l}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
$ f(a)
|
||||
:$ f(a)
|
||||
{a}
|
||||
|
||||
~ f("ok")
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
$ f(a, b)
|
||||
:$ f(a, b)
|
||||
{a}{b}
|
||||
|
||||
~ f("ok")
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
$ f(a, b, l...)
|
||||
:$ f(a, b, l...)
|
||||
{a}{b}
|
||||
{l}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
$ f(a, b, l...)
|
||||
:$ f(a, b, l...)
|
||||
{a}{b}
|
||||
{l}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
$ f(a, b)
|
||||
:$ f(a, b)
|
||||
{a}{b}
|
||||
|
||||
~ f("o", "k")
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
:a = 5
|
||||
|
||||
$ f(p)
|
||||
:$ f(p)
|
||||
@a
|
||||
|
||||
$ f(p) := v
|
||||
:$ f(p) := v
|
||||
v={v}
|
||||
~ a := v
|
||||
|
||||
$ f(p) := v::string
|
||||
:$ f(p) := v::string
|
||||
v2={v}
|
||||
~ a := p
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
$ f(a, b)
|
||||
:$ f(a, b)
|
||||
|
||||
$ f(x)
|
||||
:$ f(x)
|
||||
|
||||
$ f(a, b)
|
||||
:$ f(a, b)
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
:french name="french"::name
|
||||
:esperanto name="esperanto"::name
|
||||
|
||||
$ a(name::string)
|
||||
:$ a(name::string)
|
||||
{name} is english or generic
|
||||
|
||||
$ a(name:nom::french name)
|
||||
:$ a(name:nom::french name)
|
||||
{nom} is french
|
||||
|
||||
~ a("bob"::name)
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
:french name="french"::name
|
||||
:esperanto name="esperanto"::name
|
||||
|
||||
$ a(name)
|
||||
:$ a(name)
|
||||
{name} is english or generic
|
||||
|
||||
$ a(name:nom::french name)
|
||||
:$ a(name:nom::french name)
|
||||
{nom} is french
|
||||
|
||||
~ a("bob"::name)
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
$ f
|
||||
$ a
|
||||
:$ f
|
||||
:$ a
|
||||
a
|
||||
$ b
|
||||
:$ b
|
||||
b
|
||||
$ c
|
||||
:$ c
|
||||
c
|
||||
~ cycle(&a,&b,&c)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +0,0 @@
|
|||
a.👁️: {a.👁️} $ a
|
||||
|
||||
~ a()
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
$ f
|
||||
ko
|
||||
a.👁️: {a.👁️} $ a
|
||||
ok
|
||||
|
||||
~ f.a
|
||||
|
||||
In function:
|
||||
~ f
|
||||
|
|
@ -1 +0,0 @@
|
|||
a.👁️: {a.👁️} $ a
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
$ fn(x)
|
||||
:$ fn(x)
|
||||
x
|
||||
|
||||
$ fn(a)
|
||||
:$ fn(a)
|
||||
a
|
||||
|
||||
~ fn(a=5)
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
$ f
|
||||
$ a
|
||||
:$ f
|
||||
:$ a
|
||||
a
|
||||
$ b
|
||||
:$ b
|
||||
b
|
||||
$ c
|
||||
:$ c
|
||||
c
|
||||
~ next(&a, &b, &c)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
$ f(a, b)
|
||||
:$ f(a, b)
|
||||
|
||||
$ f(x)
|
||||
:$ f(x)
|
||||
|
||||
$ f(u, v)
|
||||
:$ f(u, v)
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
$ f
|
||||
$ a
|
||||
:$ f
|
||||
:$ a
|
||||
a
|
||||
$ b
|
||||
:$ b
|
||||
b
|
||||
$ c
|
||||
:$ c
|
||||
c
|
||||
~ random(&a,&b,&c)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
$ fn
|
||||
:$ fn
|
||||
1
|
||||
§ c
|
||||
:! c
|
||||
2
|
||||
|
||||
:c = &fn
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
$ f(x)
|
||||
:$ f(x)
|
||||
@x+2
|
||||
|
||||
$ g(x)
|
||||
:$ g(x)
|
||||
@x+3
|
||||
|
||||
:a = &f
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
$ fn
|
||||
:$ fn
|
||||
@1
|
||||
|
||||
$ add(x)
|
||||
:$ add(x)
|
||||
@x+2
|
||||
|
||||
:c = &fn
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
$ f
|
||||
$ a
|
||||
:$ f
|
||||
:$ a
|
||||
@12
|
||||
|
||||
:x = &f
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
$ f
|
||||
:$ f
|
||||
:a = 12
|
||||
|
||||
:x = &f
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
$ hey
|
||||
§ foo
|
||||
:$ hey
|
||||
:! foo
|
||||
@2
|
||||
@3
|
||||
@5
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
$ hey
|
||||
:$ hey
|
||||
@5
|
||||
a
|
||||
@2
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
$ hey
|
||||
§ foo
|
||||
:$ hey
|
||||
:! foo
|
||||
@2
|
||||
@5
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
$ hey
|
||||
:$ hey
|
||||
@5
|
||||
|
||||
{hey}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
$ a
|
||||
:$ a
|
||||
:b = 5
|
||||
|
||||
a: {b}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
$ a
|
||||
:$ a
|
||||
:b = 5
|
||||
|
||||
a: {a.b}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
:n = 0
|
||||
|
||||
$ f(c=1)
|
||||
:$ f(c=1)
|
||||
:a = []
|
||||
|
||||
start: {a}
|
||||
|
|
@ -20,7 +20,7 @@ new list each time:
|
|||
|
||||
~ f
|
||||
|
||||
$ g(c=1, a=[])
|
||||
:$ g(c=1, a=[])
|
||||
start: {a}
|
||||
|
||||
~ a!insert(c)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
:n = 0
|
||||
|
||||
$ f(c=1)
|
||||
:$ f(c=1)
|
||||
:a = 1
|
||||
|
||||
start: {a}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
$ f()
|
||||
:$ f()
|
||||
:a = 1
|
||||
|
||||
{a}
|
||||
|
||||
~ a := a + 1
|
||||
|
||||
$ g
|
||||
:$ g
|
||||
:a = 1
|
||||
|
||||
{a}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
$ a(x::number)
|
||||
:$ a(x::number)
|
||||
@x + 2
|
||||
|
||||
$ x
|
||||
$ a(x::string)
|
||||
:$ x
|
||||
:$ a(x::string)
|
||||
@x + "heh"
|
||||
|
||||
{a("plop")}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
$ f
|
||||
:$ f
|
||||
:a = 2
|
||||
|
||||
$ f(x)
|
||||
:$ f(x)
|
||||
:a = 5
|
||||
|
||||
$ f(b)
|
||||
:$ f(b)
|
||||
:a = 10
|
||||
|
||||
{f.a} = 2
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
$ fn(x::number)
|
||||
:$ fn(x::number)
|
||||
x
|
||||
|
||||
$ fn(a::number)
|
||||
:$ fn(a::number)
|
||||
a
|
||||
|
||||
~ fn(5)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
$ fn(x::number)
|
||||
:$ fn(x::number)
|
||||
x
|
||||
|
||||
$ fn(a="o"::string)
|
||||
:$ fn(a="o"::string)
|
||||
a
|
||||
|
||||
~ fn("s")
|
||||
|
|
@ -10,10 +10,10 @@ $ fn(a="o"::string)
|
|||
|
||||
~ fn()
|
||||
|
||||
$ g(n="s", a=5::number)
|
||||
:$ g(n="s", a=5::number)
|
||||
@"gn"
|
||||
|
||||
$ g(n="s", a="lol"::string)
|
||||
:$ g(n="s", a="lol"::string)
|
||||
@"gs"
|
||||
|
||||
{g(n="k", a="l")}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
$ fn(x::number)
|
||||
:$ fn(x::number)
|
||||
x
|
||||
|
||||
$ fn(a::string)
|
||||
:$ fn(a::string)
|
||||
a
|
||||
|
||||
~ fn("s")
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
$ f(a)
|
||||
:$ f(a)
|
||||
{a}
|
||||
|
||||
~ "ok"!f
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
$ f(a, b)
|
||||
:$ f(a, b)
|
||||
{a}{b}
|
||||
|
||||
~ "o"!f("k")
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
$ f(l...)
|
||||
:$ f(l...)
|
||||
{l}
|
||||
|
||||
~ f()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
$ f(l...)
|
||||
:$ f(l...)
|
||||
{l}
|
||||
|
||||
~ f("o", "k")
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
$ f
|
||||
:$ f
|
||||
ok
|
||||
|
||||
~ f
|
||||
|
|
|
|||
4
test/tests/immediately run function explicit call.ans
Normal file
4
test/tests/immediately run function explicit call.ans
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
:~$ a
|
||||
a.👁️: {a.👁️}
|
||||
|
||||
~ a()
|
||||
10
test/tests/immediately run function implicit call.ans
Normal file
10
test/tests/immediately run function implicit call.ans
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
:$ f
|
||||
ko
|
||||
:~$ a
|
||||
a.👁️: {a.👁️}
|
||||
ok
|
||||
|
||||
~ f.a
|
||||
|
||||
In function:
|
||||
~ f
|
||||
2
test/tests/immediately run function scope.ans
Normal file
2
test/tests/immediately run function scope.ans
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
:~$ a
|
||||
a.👁️: {a.👁️}
|
||||
4
test/tests/immediately run variable.ans
Normal file
4
test/tests/immediately run variable.ans
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
:$ a
|
||||
a.👁️: {a.👁️}
|
||||
|
||||
:~ b = &a
|
||||
19
test/tests/immediately run variable.lua
Normal file
19
test/tests/immediately run variable.lua
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
local _={}
|
||||
_[7]={}
|
||||
_[6]={}
|
||||
_[5]={tags=_[7],text="0"}
|
||||
_[4]={tags=_[6],text="a.\240\159\145\129\239\184\143: "}
|
||||
_[3]={_[4],_[5]}
|
||||
_[2]={"return"}
|
||||
_[1]={"text",_[3]}
|
||||
return {_[1],_[2]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "a.👁️: "
|
||||
}, {
|
||||
tags = {},
|
||||
text = "0"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1,14 +1,14 @@
|
|||
Function with argument:
|
||||
|
||||
$ f(x)
|
||||
:$ f(x)
|
||||
|
||||
{&f}
|
||||
|
||||
Function without argument:
|
||||
|
||||
$ a
|
||||
:$ a
|
||||
lol
|
||||
$ b
|
||||
:$ b
|
||||
hihi
|
||||
|
||||
a: {a}
|
||||
|
|
@ -39,8 +39,8 @@ ref.b(): {ref.b()}
|
|||
|
||||
Objects:
|
||||
|
||||
% A
|
||||
$ b
|
||||
:% A
|
||||
:$ b
|
||||
KK
|
||||
@1
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
$ oh
|
||||
§ leave
|
||||
:$ oh
|
||||
:! leave
|
||||
in interrupt: {bar.var}
|
||||
no
|
||||
$ bar
|
||||
:$ bar
|
||||
:var = 5
|
||||
|
||||
~ var := 2
|
||||
|
|
@ -11,7 +11,7 @@ $ oh
|
|||
|
||||
~ interrupt("leave")
|
||||
|
||||
§ foo
|
||||
:! foo
|
||||
checkpoint
|
||||
|
||||
after: {var}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
$ leave
|
||||
:$ leave
|
||||
in interrupt: {oh.bar.var}
|
||||
|
||||
$ oh
|
||||
:$ oh
|
||||
no
|
||||
$ bar
|
||||
:$ bar
|
||||
:var = 5
|
||||
|
||||
~ var := 2
|
||||
|
|
@ -12,7 +12,7 @@ $ oh
|
|||
|
||||
~ interrupt("leave")
|
||||
|
||||
§ foo
|
||||
:! foo
|
||||
checkpoint
|
||||
|
||||
after: {var}
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
$ bar
|
||||
:$ bar
|
||||
:var = 5
|
||||
|
||||
~ var := 2
|
||||
|
||||
$ leave
|
||||
:$ leave
|
||||
in interrupt: {var}
|
||||
|
||||
before: {var}
|
||||
|
||||
~ interrupt("leave")
|
||||
|
||||
§ foo
|
||||
:! foo
|
||||
checkpoint
|
||||
|
||||
after: {var}
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
$ bar
|
||||
:$ bar
|
||||
:var = 5
|
||||
|
||||
~ var := 2
|
||||
|
||||
$ leave
|
||||
:$ leave
|
||||
in interrupt: {var}
|
||||
|
||||
before: {var}
|
||||
|
||||
~ interrupt()
|
||||
|
||||
§ foo
|
||||
:! foo
|
||||
checkpoint
|
||||
|
||||
after: {var}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
$ a
|
||||
:$ a
|
||||
a
|
||||
@1
|
||||
|
||||
$ b
|
||||
:$ b
|
||||
b
|
||||
@0
|
||||
|
||||
|
|
|
|||
|
|
@ -10,17 +10,17 @@ x={x}
|
|||
|
||||
a(x)={a(x)}
|
||||
|
||||
§ ch a
|
||||
:! ch a
|
||||
|
||||
a(x)={a(x)}
|
||||
|
||||
§ ch b
|
||||
:! ch b
|
||||
|
||||
~ x(2) := 3
|
||||
|
||||
a(x)={a(x)}
|
||||
|
||||
§ ch c
|
||||
:! ch c
|
||||
|
||||
a(x)={a(x)}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,13 +5,13 @@
|
|||
|
||||
~ a!insert(b)
|
||||
|
||||
§ c
|
||||
:! c
|
||||
|
||||
~ b!insert(3)
|
||||
|
||||
§ d
|
||||
:! d
|
||||
|
||||
~ b!insert(4)
|
||||
|
||||
$ check
|
||||
:$ check
|
||||
\[1,\[2,3,4]]: {a}
|
||||
|
|
|
|||
|
|
@ -5,15 +5,15 @@
|
|||
|
||||
~ a!insert(b)
|
||||
|
||||
§ c
|
||||
:! c
|
||||
|
||||
~ b!insert(3)
|
||||
|
||||
§ d
|
||||
:! d
|
||||
|
||||
~ b!insert(4)
|
||||
|
||||
~ error("abort")
|
||||
|
||||
$ check
|
||||
:$ check
|
||||
\[1,\[2,3]]: {a}
|
||||
|
|
|
|||
|
|
@ -5,15 +5,15 @@
|
|||
|
||||
~ a!insert(b)
|
||||
|
||||
§ c
|
||||
:! c
|
||||
|
||||
~ b!insert(3)
|
||||
|
||||
§ d
|
||||
:! d
|
||||
|
||||
~ a!insert(4)
|
||||
|
||||
~ error("abort")
|
||||
|
||||
$ check
|
||||
:$ check
|
||||
\[1,\[2,3]]: {a}
|
||||
|
|
|
|||
|
|
@ -5,13 +5,13 @@
|
|||
|
||||
~ a!insert(b)
|
||||
|
||||
§ c
|
||||
:! c
|
||||
|
||||
~ b!insert(3)
|
||||
|
||||
§ d
|
||||
:! d
|
||||
|
||||
~ a!insert(4)
|
||||
|
||||
$ check
|
||||
:$ check
|
||||
\[1,\[2,3],4]: {a}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
$ f(a, b, c)
|
||||
:$ f(a, b, c)
|
||||
@a + b + c
|
||||
|
||||
{f("a", "b", "c")} = {f(a="a", b="b", c="c")} = {f(c="c", a="a", b="b")}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
$ f(l...)
|
||||
:$ f(l...)
|
||||
~ l!len
|
||||
:a = 0
|
||||
~ a := l(1)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
% class
|
||||
:% class
|
||||
:a:b = "foo"
|
||||
:c = "bar"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
% class
|
||||
:% class
|
||||
:a:b = "foo"
|
||||
:c = "bar"
|
||||
|
||||
$ new(o::&class, x)
|
||||
:$ new(o::&class, x)
|
||||
~ o.c := x
|
||||
@o
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
% class
|
||||
:% class
|
||||
:a:b = "foo"
|
||||
:c = "bar"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
% class
|
||||
:% class
|
||||
:a:b = "foo"
|
||||
:c = "bar"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
$ f(a, b, c="c")
|
||||
:$ f(a, b, c="c")
|
||||
@a + b + c
|
||||
|
||||
{f("a", "b")} = {f("a", "b", "c")} = {f(b="b", a="a")}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
§ f : test
|
||||
:! f : test
|
||||
@"ok"
|
||||
|
||||
{f} = {test}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
$ f
|
||||
:$ f
|
||||
x
|
||||
§ p
|
||||
:! p
|
||||
a
|
||||
b
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
$ f
|
||||
:$ f
|
||||
x
|
||||
§ p
|
||||
:! p
|
||||
a
|
||||
b
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
$ f
|
||||
:$ f
|
||||
x
|
||||
§ p
|
||||
:! p
|
||||
a
|
||||
b
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
§ p
|
||||
:! p
|
||||
a
|
||||
b
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
$ f
|
||||
:$ f
|
||||
x
|
||||
§ p
|
||||
:! p
|
||||
a
|
||||
|
||||
§ q
|
||||
:! q
|
||||
b
|
||||
|
||||
c
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
$ f
|
||||
:$ f
|
||||
# "a"="a"
|
||||
a
|
||||
~ 1 # "x"="x"
|
||||
# "b"="b"
|
||||
§ p
|
||||
:! p
|
||||
b # "c"="c"
|
||||
|
||||
c
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
$ f
|
||||
:$ f
|
||||
> a
|
||||
-> a
|
||||
§ p
|
||||
:! p
|
||||
> aa
|
||||
-> aa
|
||||
> ab
|
||||
|
|
@ -18,10 +18,10 @@ $ f
|
|||
|
||||
~ f.p
|
||||
|
||||
$ g
|
||||
:$ g
|
||||
> a
|
||||
-> a
|
||||
§ p
|
||||
:! p
|
||||
> aa
|
||||
-> aa
|
||||
> ab
|
||||
|
|
@ -38,11 +38,11 @@ $ g
|
|||
|
||||
~ g.p
|
||||
|
||||
$ h
|
||||
:$ h
|
||||
~ 1
|
||||
> a
|
||||
-> a
|
||||
§ p
|
||||
:! p
|
||||
> aa
|
||||
-> aa
|
||||
> ab
|
||||
|
|
@ -58,10 +58,10 @@ $ h
|
|||
|
||||
~ h.p
|
||||
|
||||
$ i
|
||||
:$ i
|
||||
> a
|
||||
-> a
|
||||
§ p
|
||||
:! p
|
||||
> aa
|
||||
-> aa
|
||||
> ab
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
$ f
|
||||
:$ f
|
||||
~ 1
|
||||
§ p
|
||||
:! p
|
||||
x
|
||||
~~
|
||||
y
|
||||
|
|
@ -9,9 +9,9 @@ $ f
|
|||
|
||||
~ f.p
|
||||
|
||||
$ g
|
||||
:$ g
|
||||
~ 0
|
||||
§ p
|
||||
:! p
|
||||
x
|
||||
~~
|
||||
y
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
$ fn
|
||||
:$ fn
|
||||
:i=0
|
||||
@i
|
||||
~ i:=5
|
||||
|
|
@ -6,7 +6,7 @@ $ fn
|
|||
|
||||
{fn} = 50
|
||||
|
||||
$ g
|
||||
:$ g
|
||||
@0
|
||||
@3
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
$ f
|
||||
:$ f
|
||||
> a
|
||||
x
|
||||
@1
|
||||
|
|
|
|||
|
|
@ -6,13 +6,13 @@
|
|||
|
||||
:n = 0
|
||||
|
||||
$ f(t)
|
||||
:$ f(t)
|
||||
~ t!insert(len(l)+1)
|
||||
|
||||
f1: {l} {t}
|
||||
|
||||
CHECK
|
||||
§ c
|
||||
:! c
|
||||
|
||||
~ n < 1
|
||||
REC
|
||||
|
|
@ -25,7 +25,7 @@ $ f(t)
|
|||
f2: {l}
|
||||
|
||||
CHECK 2
|
||||
§ d
|
||||
:! d
|
||||
|
||||
~ t!insert(len(t)+1)
|
||||
|
||||
|
|
@ -43,7 +43,7 @@ l: {l}
|
|||
|
||||
x: {x}
|
||||
|
||||
$ check
|
||||
:$ check
|
||||
AFTER ERROR
|
||||
|
||||
l: {l}
|
||||
|
|
@ -4,13 +4,13 @@
|
|||
|
||||
:n = 0
|
||||
|
||||
$ f(t)
|
||||
:$ f(t)
|
||||
~ t!insert(len(l)+1)
|
||||
|
||||
f1: {l} {t}
|
||||
|
||||
CHECK
|
||||
§ c
|
||||
:! c
|
||||
|
||||
~ n < 1
|
||||
REC
|
||||
|
|
@ -23,7 +23,7 @@ $ f(t)
|
|||
f2: {l}
|
||||
|
||||
CHECK 2
|
||||
§ d
|
||||
:! d
|
||||
|
||||
~ t!insert(len(t)+1)
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue