Add1 from circuit to R5RS

I wrote the code, but it does not work, because the function add1that I used in Scheme does not work with R5RS. What can replace add1in R5RS?

+2
source share
2 answers

The procedure is add1very simple, you can implement it yourself:

(define (add1 x)
  (+ x 1))
+6
source

late answer, but alternative (using lambda)).

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

All Articles