Skip to content

Instantly share code, notes, and snippets.

@alexispurslane
Created February 24, 2015 20:56
Show Gist options
  • Save alexispurslane/88cb8b4832c35f0b31f0 to your computer and use it in GitHub Desktop.
Save alexispurslane/88cb8b4832c35f0b31f0 to your computer and use it in GitHub Desktop.
Gets the digits of a number by converting it to a string, then separating the strings characters, and converting them to numbers. I am using this for my CARDIAC computer emulator.
(define (get-digits n)
(map string->number (map string (string->list (number->string n)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment