can't - at top. 14*p (LAMBDA (x y z) **COMMENT** (if & then z else &)) 14*(p 0 100) =P (LAMBDA (x y z) **COMMENT** (if (lessp y x) then z else (tak (tak (sub1 x) y z) (tak (sub1 y) z x) (tak (sub1 z) x y)))) 15* ; エディタを^Dで抜けてtakを実行してみる

5_(tak 18 12 6) lessp {in tak} -> LESSP ? yes ;DWIMがスペル修正 sub1 {in tak} -> SUB1 ? yes sub1 {in tak} -> SUB1 ? ...yes sub1 {in tak} -> SUB1 ? yes 6 ; おや、結果が7でない。LESSPではなくて、(NOT (GREATERP))の間違いだった。 6_redo 4 ; コマンド番号4を再実行 edit 15*(## 4 16*p (if (LESSP y x) then z else (tak & & &)) 16*2 16*p (LESSP y x) 16*(1 greaterp) 17*p (greaterp y x) 18*(LI 1) 18*p ((greaterp y x)) 18*(-1 NOT) ; エディタを^Dで抜けてtakを実行してみる

14_redo 5 greaterp {in tak} -> GREATERP ? yes 7 15_(prettyprint '(tak)) ;prettyprintで定義を表示してみる =PRETTYPRINT

(tak [LAMBDA (x y z) **COMMENT** (if (NOT (GREATERP x y)) then z else (tak (tak (SUB1 x) y z) (tak (SUB1 y) z x) (tak (SUB1 z) x y]) (tak) 15_(prettydef '(tak)) ;prettydefの場合(DEFINEQが付く) =PRETTYDEF (DEFINEQ

(tak [LAMBDA (x y z) **COMMENT** (if (NOT (GREATERP x y)) then z else (tak (tak (SUB1 x) y z) (tak (SUB1 y) z x) (tak (SUB1 z) x y]) ) T