2012-07-18 20 views
2

您好,我正在關注the quick introduction to racket。在第5章,他們建議,該代碼(這工作得很好):hc-append模塊中的未綁定標識符

(define (four p) 
    (define two-p (hc-append p p)) 
    (vc-append two-p two-p)) 

將tipically可以通過使用我們寫的,所以我寫了我的代碼:

#lang slideshow 

(define (square n) 
    (filled-rectangle n n)) 
(define (four p) 
    (let ([two-p (hc-apppend p p)]) 
    (vc-append two-p two-p))) 

,但它不工作。 的錯誤信息是:

expand: unbound identifier in module in: hc-apppend 

回答

5

只是檢查:你還記得

#lang slideshow 

的第一線?

另外,請計算人數p!它是hc-append。錯誤提到hc-apppend:它應該是hc-append

+0

是的,當然,否則它不會工作的第一塊代碼 – 2012-07-19 06:05:35

+0

在這種情況下,確實很奇怪。你的例子適用於我。 – soegaard 2012-07-19 11:34:52

+0

只是在一個新的DrRacket中再次嘗試,現在我也看到了問題。 – soegaard 2012-07-19 11:36:21