Ask Your Question

How do lambda elements get on the stack?

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

anonymous user

Anonymous Coward

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
Login/Signup to Answer

Question tools

1 follower


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

Seen: 6,681 times

Last updated: Jan 07