Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (define (reversal str)
- (if (= (string-length str) 0)
- ""
- (string-append
- (reversal (substring str 1 (string-length str)))
- (string-ith str 0)
- )
- )
- )
- ; Takes the first letter of the user input, puts it to the end, and then flips itself backwards.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement