开发者

Scheme Beginner question

I am trying to put the following statement in Dr.Scheme:

{with {x {+ 5 5}} {+ x x}}

but I got an error:

expand: unbound identifier in module in: with

anyone could help me?Thank开发者_运维百科s.


You're taking some PLAI-based course, and you confuse the language that you're working in (Scheme) with the language that you're implementing (WAE, or one of the extensions). These two are very different things, and the book uses curly braces in the latter to avoid confusion.

I can tell you from experience of teaching this class a number of times that it's a dangerous confusion, and the sooner you clarify things the better. If you leave it behind things might get more confusing in the near future. So spend some time on the differences between the two languages, and make sure that you know which parts of the book talk about which language.


Are you trying to do this:

(let ([x (+ 5 5)] ) (+ x x ))

It would be really helpful if you could say what dialect of Scheme you are trying to use.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜