nconc
nconc copied to clipboard
Continuations doesn't work as they should
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.