我正在尝试编写一个带两个参数的forAll过程:系列的开始和结束值。结果闭包需要两个参数:适用于系列中所有元素的操作以及初始值。 这就是我所拥有的,我似乎错过了某些东西,或者我不理解背后的概念。 (define (forAll n m)
(if (>= n m) '()
(forAll (+ n 1) m))
(lambda (op start) (op start n m
我正在尝试使用Scheme编程点距离公式。除非我遇到错误,否则我非常接近。 确切的错误是: Traceback (most recent call last):
File "In [54]", line 5, col 11, in 'application'
File "In [54]", line 5, col 11
RunTimeError: attempt to apply no