0
當我做(造訪醫生吃晚飯),此代碼:錯誤與下面的代碼
(define (visit-doctor name)
(if (equal? name 'suppertime) (end-session)
((write-line (list 'hello name))
(write-line '(what seems to be the trouble?))
(doctor-driver-loop name initial-earlier-response))))
(define (end-session) (write-line '(the doctor is done seeing patients today)))
它給了我這個錯誤:
應用程序:不是一個程序; 預期考慮到可以應用到參數的過程 :# 參數...: # #
如果使用DrRacket,你看到了相應於球拍認爲錯誤可能位於一個紅色的亮點?我在行上看到一個問題'((write-line(list'hello name)):對我來說,它看起來像一個雙功能應用程序,你可能打算做一個單一的應用程序,對於這個特定的情況,DrRacket **應該**給你這個錯誤的確切位置,你看到了嗎? – dyoo 2013-02-28 07:49:28