I'm not sure what's going wrong here, I believe my syntax is correct but I've no idea what the error is trying to say.
(define (even-nm-inst? n)
(cond ((= n 2) #t)
((= n 4) #t)
((= n 6) #t)
((= n 8) #t)
((= n 10) #t)
((> n 2)
(modulo n 2)
(cond ((= n 0) #t)
(cond ((= n 1) #f)
((< n 2)
(modulo n 2)
(cond ((= n 0) #t)
((= n 1) #f)
)))))))
I'm trying to make a function that determines if a number is even or not.
The specific error returned is: . ../../Applications/Racket v6.6/share/pkgs/r5rs-lib/r5rs/main.rkt:493:22: with-syntax: binding match failed in: (_ . rest)
Any idea what's going on? I know it's this specific part of code because I have headers on the different sections, and the error appears under the header for this chunk.
Thanks in advance, I'm brand new to scheme.