我正在嘗試使用SICP,但得到了一些代碼。所以我開(kāi)始:#lang scheme(word 'comp 'uter)返回的錯(cuò)誤:函數(shù)(字)未定義。即使我嘗試將其復(fù)制到IDE(運(yùn)行)中:(define word? (let ((number? number?) (symbol? symbol?) (string? string?)) (lambda (x) (or (symbol? x) (number? x) (string? x)))))還是一樣。我認(rèn)為這可能與語(yǔ)言版本有關(guān)。上面是“簡(jiǎn)單方案”中的內(nèi)容,當(dāng)我在SICP中準(zhǔn)確介紹代碼時(shí):(define (sqrt x) (sqrt-iter 1.0 x))IDE返回sqrt-iter未定義??梢栽诘谝徽轮姓业皆摯a:http : //mitpress.mit.edu/sicp/code/index.html
其中郎包用于SICP在Dr.Racket是正確的?
慕哥9229398
2019-10-30 10:16:04