Skip to content

Instantly share code, notes, and snippets.

@technohippy
Created January 7, 2010 06:50
Show Gist options
  • Save technohippy/271049 to your computer and use it in GitHub Desktop.
Save technohippy/271049 to your computer and use it in GitHub Desktop.
(let ((sum 0) (nums (string->list "123")))
(while (pair? nums)
(set! sum (+ sum (- (char->integer (pop! nums)) (char->integer #\0)))))
(print sum))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment