Created
April 30, 2013 23:04
-
-
Save ayato-p/5492610 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env gosh | |
(define (main args) | |
(let ((li (string->list (cadr args)))) | |
(fold (lambda (a b) | |
(cond ((eq? #\+ a) (+ b 1)) | |
((eq? #\- a) (- b 1)) | |
(else (display (integer->char b)) | |
b))) | |
0 | |
li)) | |
0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment