ligo/test/contracts/reverse_loop.tz
2017-08-18 18:14:17 +02:00

7 lines
226 B
Plaintext

parameter (list string);
return (list string);
storage unit;
code { CAR; NIL string; SWAP; PUSH bool True;
LOOP { IF_CONS {SWAP; DIP{CONS}; PUSH bool True} {NIL string; PUSH bool False}};
DROP; UNIT; SWAP; PAIR}