whalesong/tests/more-tests/cont-marks-1.rkt

14 lines
409 B
Racket

#lang planet dyoo/whalesong
(define (puzzle n)
(if (= n 0)
(continuation-mark-set->list (current-continuation-marks) 'secret)
(with-continuation-mark 'secret
(* n (first (continuation-mark-set->list (current-continuation-marks) 'secret)))
(puzzle (sub1 n)))))
(continuation-mark-set->list (current-continuation-marks) 'secret)
(with-continuation-mark 'secret 1
(puzzle 10))