方案中的问题
这是解决 Hanoy 塔问题的方案中的下一个程序有什么问题
(define tower_of_hanoi
(lambda (move discs from to using)
(if (> discs 0)
((tower_of_hanoi move (- discs 1) from using to)
(tower_of_hanoi move (- discs 1) using to from)))))
(procedure application: expected procedure, given: #void; arguments were: #void)
谢谢大家。
what is the problem this the next program in Scheme which solve the problem of Hanoy's tower
(define tower_of_hanoi
(lambda (move discs from to using)
(if (> discs 0)
((tower_of_hanoi move (- discs 1) from using to)
(tower_of_hanoi move (- discs 1) using to from)))))
(procedure application: expected procedure, given: #void; arguments were: #void)
Thank u all.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在您的代码中,您在 () 中调用了两个函数。当您使用它时,您的符号需要是一个函数/过程。所以你得到了错误。
检查下面的代码。我将其更改为
(和
In your code you were calling two function calls in (). When you use that your symbol need to be a function/procedure. So you got the error.
Check the code below. I changed it to
(and