aboutsummaryrefslogtreecommitdiff
path: root/test/functions.tm
blob: e2e35bf886418f8c94d3f5f91fbb98a936ad5de8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
func add(x:Int, y:Int -> Int)
	return x + y

func cached_heap(x:Int->@Int; cached)
	return @x

func main()
	assert add(3, 5) == 8

	assert cached_heap(1) == cached_heap(1)
	assert cached_heap(1) != cached_heap(2)