2009-07-11から1日間の記事一覧

EoPL reading (23) 1.3.1 Free and Bound Variables

エントリを改めます。以下な試験を追加したところ (test-section "ut") (test* "(occurs-free? 'y 'y) should return #t" #t (occurs-free? 'y 'y)) (test* "(occurs-free? 'x 'y) should return #f" #f (occurs-free? 'x 'y)) (test* "(occurs-free? 'x '(l…

EoPL reading (22) 1.3.1 Free and Bound Variables

1.20 な問題を、と思ったんですが何が言いたいのかが微妙に分からず。おそらくは occurs free の定義がきちんと理解できてないのが原因かと。 例示されているのは以下の式で ((lambda (x) x) y)x occurs bound で y occurs free との事。これをテストケイス…

EoPL reading (21) 1.3.1 Free and Bound Variables

Exercise-1.19 bound-vars の方も。free-vars の試験をコピッて以下をでっち上げる。

EoPL reading (20) 1.3.1 Free and Bound Variables

とりあえず仕事対応しつつ以下な試験を追加。 (test* "(free-vars '(lambda (x) (x))) should return ()" '() (free-vars '(lambda (x) (x)))) (test* "(free-vars '(lambda (x) (x 1 2 3))) should return ()" '() (free-vars '(lambda (x) (x 1 2 3)))) (t…