Choice r5rs-letrec

The interaction of letrec with reentrant continuations is rather nontrivial. Gurus who know more than I assert that R5RS requires this form to return 0, but not all Schemes follow that recommendation.

This choice is tested for by running

(let ((cont #f))
  (letrec ((x (call-with-current-continuation (lambda (c) (set! cont c) 0)))
           (y (call-with-current-continuation (lambda (c) (set! cont c) 0))))
    (if cont
        (let ((c cont))
          (set! cont #f)
          (set! x 1)
          (set! y 1)
          (c 0))
        (+ x y))))

in each Scheme.