aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/arrays.tm4
-rw-r--r--test/lambdas.tm10
2 files changed, 7 insertions, 7 deletions
diff --git a/test/arrays.tm b/test/arrays.tm
index de1771b7..95b4fe38 100644
--- a/test/arrays.tm
+++ b/test/arrays.tm
@@ -87,10 +87,10 @@ func main():
>> nums
= [-20, 10, 30]
// Custom sort functions:
- >> nums:sort(func(x:&%Int,y:&%Int) x:abs() <> y:abs())
+ >> nums:sort(func(x:&%Int,y:&%Int): x:abs() <> y:abs())
>> nums
= [10, -20, 30]
- >> nums:sort(func(x:&%Int,y:&%Int) y[] <> x[])
+ >> nums:sort(func(x:&%Int,y:&%Int): y[] <> x[])
>> nums
= [30, 10, -20]
diff --git a/test/lambdas.tm b/test/lambdas.tm
index 0ec0826b..15a8f23b 100644
--- a/test/lambdas.tm
+++ b/test/lambdas.tm
@@ -1,18 +1,18 @@
func make_adder(x:Int)-> func(y:Int)->Int:
- return func(y:Int) x + y
+ return func(y:Int): x + y
func suffix_fn(fn:func(t:Text)->Text, suffix:Text)->func(t:Text)->Text:
- return func(t:Text) fn(t)++suffix
+ return func(t:Text): fn(t)++suffix
func mul_func(n:Int, fn:func(x:Int)->Int)-> func(x:Int)->Int:
- return func(x:Int) n*fn(x)
+ return func(x:Int): n*fn(x)
func main():
- >> add_one := func(x:Int) x + 1
+ >> add_one := func(x:Int): x + 1
>> add_one(10)
= 11
- >> shout := func(msg:Text) say("{msg:upper()}!")
+ >> shout := func(msg:Text): say("{msg:upper()}!")
>> shout("hello")
>> asdf := add_one