ligo/src/test/contracts/expected/set_arithmetic.religo.expected
2020-06-05 16:20:31 +02:00

16 lines
444 B
Plaintext

let literal_op = (p: unit): set(string) =>
Set.literal(["foo", "bar", "foobar"]);
let add_op = (s: set(string)): set(string) =>
Set.add("foobar", s);
let remove_op = (s: set(string)): set(string) =>
Set.remove("foobar", s);
let remove_deep = (s: (set(string), nat)): set(string) =>
Set.remove("foobar", s[0]);
let mem_op = (s: set(string)): bool => Set.mem("foobar", s);
let size_op = (s: set(string)): nat => Set.cardinal(s);