tomo/test/lambdas.tm

10 lines
133 B
Plaintext
Raw Normal View History

2024-03-09 11:03:42 -08:00
>> add_one := func(x:Int) x + 1
>> add_one
>> add_one(10)
= 11
2024-03-09 11:09:18 -08:00
>> shout := func(msg:Text) say("{msg:upper()}!")
>> shout("hello")