ligo/test/contracts/reverse_loop.tz

7 lines
226 B
Plaintext
Raw Normal View History

2017-08-16 00:24:40 +04:00
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}