ligo/test/contracts/contains_all.tz

11 lines
499 B
Plaintext

parameter (pair (list string) (list string));
storage unit;
return bool;
code {CAR; DUP; CAR; DIP{CDR}; EMPTY_SET string; SWAP;
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};
REDUCE; CDR; UNIT; SWAP; PAIR};