tomo/test/functions.tm

16 lines
218 B
Plaintext
Raw Normal View History

func add(x:Int, y:Int -> Int):
2024-03-09 13:46:25 -08:00
return x + y
func cached_heap(x:Int->@Int; cached):
2024-03-09 13:46:25 -08:00
return @x
2024-04-28 11:58:55 -07:00
func main():
2024-04-12 10:09:31 -07:00
>> add(3, 5)
= 8
>> cached_heap(1) == cached_heap(1)
= yes
>> cached_heap(1) == cached_heap(2)
= no
2024-03-09 13:46:25 -08:00