blob: 26dbf729d6817060e567d50266d643b6380d5c5d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
$include <prelude.sail>
val f : list(int) -> int
val g : list(int) -> int
function f([| |]) = 0
and f(h::t) = h + g(t)
function g([||]) = 0
and g(h::t) = f(t) - h
val test : unit -> int
function test() = f([|1,2,3|])
|