I've written some code but it's not working because the add1
function I used in Scheme is not working with R5RS. What can replace add1
in R5RS?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
The procedure add1
is very simple, you can implement it yourself:
(define (add1 x)
(+ x 1))
回答2:
late answer but an alternative is (making use of lambdas)..
(define add1
(lambda (x)
(+ x 1)))