问题
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)))
来源:https://stackoverflow.com/questions/13292094/add1-function-from-scheme-to-r5rs