ligo/src/test/contracts/expected/arithmetic.religo.expected

18 lines
372 B
Plaintext
Raw Normal View History

2020-06-04 21:36:12 +02:00
let mod_op = (n: int): nat => n mod 42;
2020-06-03 12:41:26 +02:00
2020-06-04 21:36:12 +02:00
let plus_op = (n: int): int => n + 42;
2020-06-03 12:41:26 +02:00
2020-06-04 21:36:12 +02:00
let minus_op = (n: int): int => n - 42;
2020-06-03 12:41:26 +02:00
2020-06-04 21:36:12 +02:00
let times_op = (n: int): int => n * 42;
2020-06-03 12:41:26 +02:00
2020-06-04 21:36:12 +02:00
let div_op = (n: int): int => n / 2;
2020-06-03 12:41:26 +02:00
2020-06-04 21:36:12 +02:00
let neg_op = (n: int): int => -n;
2020-06-03 12:41:26 +02:00
2020-06-04 21:36:12 +02:00
let foo = (n: int): int => n + 10;
2020-06-03 12:41:26 +02:00
2020-06-04 21:36:12 +02:00
let neg_op_2 = (b: int): int => -foo(b);
2020-06-03 12:41:26 +02:00
2020-06-04 21:36:12 +02:00
let ediv_op = (n: int): option((int, nat)) => ediv(n, 2);