nconc icon indicating copy to clipboard operation
nconc copied to clipboard

Continuations doesn't work as they should

Open jcubic opened this issue 3 years ago • 0 comments

Just example that doesn't work as it should. This code is not maintained anymore so I'm adding as references for those that want to use this code:

_.schemeEval(_.schemeRead(`
        ((lambda ()
(define called 0)
(define (bar)
  (set! called 2))

(define foo (lambda ()
  (call/cc
   (lambda (return)
     (return 10)
     (bar)))))

(+ (foo) called)))`))

If continuations would work correctly it would return 10 but it returns 12 instead.

jcubic avatar Aug 15 '21 11:08 jcubic