sophia/test/contracts/funargs.aes
2019-06-20 13:10:08 +02:00

48 lines
824 B
Plaintext

contract FunctionArguments =
function sum(n : int, m: int) =
n + m
function append(xs : list(string)) =
switch(xs)
[] => ""
y :: ys => String.concat(y, append(ys))
function menot(b) =
!b
function bitsum(b : bits) =
Bits.sum(b)
record answer('a) = {label : string, result : 'a}
function read(a : answer(int)) =
a.result
function sjutton(b : bytes(17)) =
b
function sextiosju(b : bytes(67)) =
b
function trettiotva(b : bytes(32)) =
b
function find_oracle(o : oracle(int, bool)) =
true
function find_query(q : oracle_query(int, bool)) =
true
datatype colour() = Green | Yellow | Red | Pantone(int)
function traffic_light(c : colour) =
Red
function tuples(t : ()) =
t
function due(t : Chain.ttl) =
true