ligo/test/contracts/loop_left.tz

9 lines
331 B
Plaintext
Raw Normal View History

parameter (list string);
return (list string);
storage unit;
code { CAR; NIL string; SWAP; PAIR; LEFT (list string);
LOOP_LEFT { DUP; CAR; DIP{CDR};
IF_CONS { SWAP; DIP{CONS}; PAIR; LEFT (list string) }
{ RIGHT (pair (list string) (list string)) }; };
UNIT; SWAP; PAIR }