1
是否可以在這裏添加另一個函數procC,以便評估的順序是procA-> procB-> procC-> procA ...?我可以使用Scheme中的continuation實現三個函數的共同例程嗎?
(define (procA another-fun)
(let loop ((n 5))
(display "In Proc A \n")
(set! another-fun (call/cc another-fun))
(when (> n 0)
(loop (- n 1)))))
(define (procB another-fun)
(let loop ((n 5))
(display "In Proc B \n")
(set! another-fun (call/cc another-fun))
(when (> n 0)
(loop (- n 1)))))