sophia/test/contracts/deadcode.aes
2019-02-08 14:16:06 +01:00

22 lines
428 B
Plaintext

namespace List =
function map1(f : 'a => 'b, xs : list('a)) =
switch(xs)
[] => []
x :: xs => f(x) :: map1(f, xs)
function map2(f : 'a => 'b, xs : list('a)) =
switch(xs)
[] => []
x :: xs => f(x) :: map2(f, xs)
contract Deadcode =
function inc1(xs : list(int)) : list(int) =
List.map1((x) => x + 1, xs)
function inc2(xs : list(int)) : list(int) =
List.map1((x) => x + 1, xs)