ligo/test/contracts/loop_left.tz
2017-11-03 15:51:11 +01:00

9 lines
331 B
Plaintext

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 }