ruandao / blog

0 stars 0 forks source link

[12.21] [sicp 3.51] #100

Closed ruandao closed 8 years ago

ruandao commented 8 years ago

配到报错:

;The object #[promise 34] is not applicable.
;To continue, call RESTART with an option number:
; (RESTART 2) => Specify a procedure to use in its place.
; (RESTART 1) => Return to read-eval-print level 1.

感觉应该是哪里配置有问题, 因为我拿别人的程序过来, 也是一样的报错

fubupc commented 8 years ago

你用的系统自带 cons-stream, 但是又自己写了个 force ,两者不匹配导致问题。你的那个 force 实现假设了一个前提: cons-stream 通过构造一个无参 lambda 函数来延迟求值。但看起来 mit-scheme 并不是这样实现的。

ruandao commented 8 years ago

@fubupc 恩, 谢谢