Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (define call/cc call-with-current-continuation)
- (define (infinite-loop proc)
- (proc)
- (infinite-loop proc))
- (define (count-to-n n)
- (call/cc (lambda (stop)
- (let ((count 0))
- (infinite-loop (lambda ()
- (if (> count n)
- (stop)
- (begin (display count)
- (set! count (+ 1 count))
- ))))))))
Advertisement
Add Comment
Please, Sign In to add comment