ligo/test/contracts/build_list.tz
2017-07-24 20:29:12 +02:00

8 lines
251 B
Plaintext

parameter uint64;
return (list uint64);
storage unit;
code {CADR; 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};