Code: Select all
(define (incr-char c)
(char (+ (char c) 1)))
(define (decr-char c)
(char (- (char c) 1)))
While it works, I've got my doubts--- I'm fairly sure it could be made better. I noticed the code for ++ and I am thinking about the ability to change the original as well as just return char + 1 etc. In assembler this is either a 'inc' or 'dec' on the dereferenced pointer and it bothers me that I don't have something similar. What say you all?
--hsm