tomo/test/functions.tm

16 lines
216 B
Plaintext
Raw Normal View History

2024-04-28 11:58:55 -07:00
func add(x:Int, y:Int)->Int:
2024-03-09 13:46:25 -08:00
return x + y
2024-04-28 11:58:55 -07:00
func cached_heap(x:Int; cached)->@Int:
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