ligo/test/contracts/build_list.tz

8 lines
250 B
Plaintext

parameter uint64;
return (list uint64);
storage unit;
code {CAR; NIL uint64; SWAP; DUP; PUSH uint64 0; CMPNEQ;
LOOP {DUP; DIP {SWAP}; CONS; SWAP; PUSH uint64 1; SWAP; SUB;
DUP; PUSH uint64 0; CMPNEQ};
CONS; UNIT; SWAP; PAIR};