Reputation: 11
(define inc (lambda(x)((+ x 1 ))))
I created the line of code above as an answer to the question
"Create a function called "inc" which will be given a numeric argument, and returns a number larger by one. For instance,
(inc 6) => 7
"
Upvotes: 0
Views: 79
Reputation: 982
You have an extra set of parentheses. You want
(define inc (lambda(x)(+ x 1 )))
instead of
(define inc (lambda(x)((+ x 1 ))))
Upvotes: 3