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

16 lines
444 B
Plaintext
Raw Normal View History

let literal_op = (p: unit): set(string) =>
Set.literal(["foo", "bar", "foobar"]);
2020-06-03 12:41:26 +02:00
let add_op = (s: set(string)): set(string) =>
Set.add("foobar", s);
2020-06-03 12:41:26 +02:00
let remove_op = (s: set(string)): set(string) =>
Set.remove("foobar", s);
2020-06-03 12:41:26 +02:00
let remove_deep = (s: (set(string), nat)): set(string) =>
Set.remove("foobar", s[0]);
2020-06-03 12:41:26 +02:00
2020-06-04 21:36:12 +02:00
let mem_op = (s: set(string)): bool => Set.mem("foobar", s);
2020-06-03 12:41:26 +02:00
2020-06-04 21:36:12 +02:00
let size_op = (s: set(string)): nat => Set.cardinal(s);