From bf3cdc3dfa4dcd0d17f182fe875d718cb4a4272f Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Thu, 23 May 2024 13:09:59 -0400 Subject: Refine the parsing of blocks so it's always ':' [inline-block] [indent indented-block] --- test/lambdas.tm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'test/lambdas.tm') 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 -- cgit v1.2.3