2
votes

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?

2
R5RS is Scheme. The S is for Scheme. Do you mean the add1 from Racket? - Joshua Taylor

2 Answers

6
votes

The procedure add1 is very simple, you can implement it yourself:

(define (add1 x)
  (+ x 1))
0
votes

late answer but an alternative is (making use of lambdas)..

(define add1 
    (lambda (x)
        (+ x 1)))