I am new to scheme. This is code sample from SICP course of MIT.
(define (+ x y)
(if (= x 0)
y
(+ (-1+ x) (1+ y))))
How do I convert this to Racket code? I want to convert to Racket because I am using DrRacket for running codes and I like that. It worked until now but complained about increment operators of scheme.
The errors I get are:
define-values: cannot change constant variable: +reference to undefined identifier: -1+
#langbased language (e.g.,#lang racket), you can redefine primitives like+that are from the language. If you are using a student language, it will restrict you in order to provide better error reporting. - Asumu Takikawa#lang schemeis an old backwards compatibility language. You probably want to just use#lang racket. I bet you're getting this error due to setting your memory limit too low or your program has a bug (e.g., infinite loop). - Asumu Takikawa