2013-10-28 09:08:57 -04:00
|
|
|
(define (time f)
|
2013-11-04 13:19:04 -05:00
|
|
|
(let ((start (current-jiffy)))
|
|
|
|
(f)
|
|
|
|
(/ (- (current-jiffy) start)
|
|
|
|
(jiffies-per-second))))
|
2013-10-28 09:08:57 -04:00
|
|
|
|
|
|
|
(define (tak x y z)
|
|
|
|
(if (> x y)
|
2013-11-04 13:19:04 -05:00
|
|
|
(tak (tak (- x 1) y z)
|
2013-10-28 09:08:57 -04:00
|
|
|
(tak (- y 1) z x)
|
|
|
|
(tak (- z 1) x y))
|
|
|
|
y))
|
|
|
|
|
|
|
|
(define (f)
|
|
|
|
(tak 12 6 0))
|
|
|
|
|
|
|
|
(write (time f))
|
2013-11-04 13:19:04 -05:00
|
|
|
(newline)
|