Entries from 2015-05-01 to 1 month

Scheme修行 19章宝石泥棒

(define atom? (lambda (x) (and (not (pair? x)) (not (null? x))))) (define fill) (define leave) (define waddle (lambda (l) (cond [(null? l) '()] [(atom? (car l)) (let () (call-with-current-continuation (lambda (rest) (set! fill rest) (leave…

call/cc(call-with-current-continuation)を知った

Scheme修行の14章を今、読んでいます。13章ではじめての構文letccというのが出てきます。letccは処理系で実装されていないことが多いらしく、そのときにはcall/ccというのが使えます。(call-with-current-continuationと省略せずに書くこともできます。) こ…