A nullary (zero arguments) lambda used in this way is called a thunk.
Thunks are used in Scheme to defer the execution of some piece of code. Suppose, for example, that we're talking about (display #f)
instead of (cont #f)
. If you wrote (display #f)
directly, then when the code execution reached that point, it'd display #f
straight away, whereas if you wrapped it in a thunk ((lambda () (display #f))
), it wouldn't display the #f
until you invoked the thunk.
Back to your code, a (cont #f)
in the code would cause an immediate jump at the point where the continuation is invoked. Wrapping it in a thunk delays the invocation of the continuation until you invoke the thunk.