ligo/test/contracts/contains_all.tz

11 lines
499 B
Plaintext
Raw Normal View History

2017-07-24 17:06:56 +04:00
parameter (pair (list string) (list string));
storage unit;
return bool;
code {CAR; DUP; CAR; DIP{CDR}; EMPTY_SET string; SWAP;
2017-07-24 17:06:56 +04:00
LAMBDA (pair string (set string)) (set string) {DUP; CAR; DIP{CDR}; PUSH bool True; SWAP; UPDATE};
REDUCE; PUSH bool True; SWAP; PAIR; SWAP;
LAMBDA (pair string (pair (set string) bool))
(pair (set string) bool)
{DUP; DUP; CAR; DIP{CDAR; DIP{CDDR}; DUP}; MEM; DIP{SWAP}; AND; SWAP; PAIR};
2017-07-24 17:06:56 +04:00
REDUCE; CDR; UNIT; SWAP; PAIR};