我正在使用https://repl.it/languages/scheme来编译我的方案代码,并且正在遇到一些函数调用错误。功能是:
(define (bloop x)
(cond
((null? x) 0)
((not (list? (car x)))
(+ 1 (bloop (cdr x))))
((eq? x ’()) (bloop (car x)))))
我想通过:
(bloop '((1) 2 3 4))
但我得到:
Error: execute: unbound symbol: "’"
对任何评论,问题或关注都表示赞赏。
行:
((eq? x ’()) (bloop (car x)))))
’
符号不是ASCII引号'
。
ps。在方案术语中,bloop
是过程。函数是数学上的东西,例如" sin(x)",但是(sin x)
是实现此功能的过程。