Skip to content

Instantly share code, notes, and snippets.

@ayato-p
Created April 30, 2013 23:04
Show Gist options
  • Save ayato-p/5492610 to your computer and use it in GitHub Desktop.
Save ayato-p/5492610 to your computer and use it in GitHub Desktop.
#! /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