2017-07-18 19:38:20 +04:00
|
|
|
parameter (list int);
|
2017-07-24 17:06:56 +04:00
|
|
|
storage unit;
|
2017-07-18 19:38:20 +04:00
|
|
|
return (option int);
|
|
|
|
code {CAR; DIP{NONE int};
|
2017-07-24 17:06:56 +04:00
|
|
|
LAMBDA
|
2017-07-18 19:38:20 +04:00
|
|
|
(pair int (option int))
|
|
|
|
(option int)
|
2017-07-24 14:28:41 +04:00
|
|
|
{DUP; DUP; CAR; SWAP; CDR;
|
2017-07-24 17:06:56 +04:00
|
|
|
IF_NONE {DIP{DROP}; SOME} {CMPGT; IF {CDR} {CAR; SOME}}};
|
|
|
|
REDUCE; UNIT; SWAP; PAIR};
|