ligo/gitlab-pages/docs/intro/src/what-and-why/ligo-counter.tz
Matej Šima 628d818163 Revert "Merge with dev"
This reverts commit 6ffe220d928dc3137496bcea0cc0f4d72edc2846.
2019-11-07 23:19:27 +00:00

41 lines
964 B
Plaintext

{ parameter (or (or int int) unit) ;
storage int ;
code { DUP ;
CAR ;
DIP { DUP } ;
SWAP ;
CDR ;
DIP { DUP } ;
SWAP ;
IF_LEFT
{ DUP ;
IF_LEFT
{ DUP ;
DIP { DIP { DIP { DUP } ; SWAP } ; SWAP } ;
SWAP ;
DIP { DUP } ;
SUB ;
SWAP ;
DROP ;
SWAP ;
DROP }
{ DUP ;
DIP { DIP { DIP { DUP } ; SWAP } ; SWAP } ;
SWAP ;
DIP { DUP } ;
ADD ;
SWAP ;
DROP ;
SWAP ;
DROP } ;
SWAP ;
DROP }
{ DROP ; PUSH int 0 } ;
NIL operation ;
PAIR ;
SWAP ;
DROP ;
SWAP ;
DROP ;
SWAP ;
DROP } }