I came across a snippet explaining Continuations using call/cc. In the snippet provided below, what is the continuation for the fn called by call/cc is the entire let block, or the lines below the call/cc ? Also can someone provide an explanation on why the entire let block is not provided as the continuation ?
#lang racket
(define resume-test-3 #f)
(define test-3 (lambda ()
; the let defines a variable i local to the lambda, and
; sets its value to 0
(let ((i 0))
;
(call/cc (lambda (k) (set! resume-test-3 k)))
;
; The next time the-continuation is called, we start here.
(displayln "I am back ")
(set! i (+ i 1))
; and return the value i
i
)
))
(test-3)
(resume-test-3)
(resume-test-3)