Ask Your Question

How do lambda elements get on the stack?

asked 2017-04-29 16:41:47 -0500

anonymous user


Sometimes in the Michelson specification there will be elements of type lambda 'a 'b appearing on the stack, for example when EXEC is specified:

:: 'a : lambda 'a 'b : 'C -> 'b : 'C

> EXEC / a : f : S => r : S

where f / a : [] => r : []

It's pretty clear how EXEC works, but how does such an f get onto the stack in the first place? I can't seem to figure out which Michelson rules could construct an element of type lambda a' b' and get it on the stack.

edit retag flag offensive close delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-04-30 01:18:08 -0500

tezos gravatar image

The instruction LAMBDA pushes a lambda on the stack. I just checked the spec and it's mysteriously missing (probably lost in a merge) but it is available and works.

edit flag offensive delete publish link more

Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

Add answer

[hide preview]

Question tools

1 follower


Asked: 2017-04-29 16:41:47 -0500

Seen: 2,427 times

Last updated: Apr 30