i am currently trying to convert an integer into a list.
E.g.
1234 => List composed of 1, 2, 3, 4
I have this:
(string->list (number->string 1234))
Unfortunately it adds #’s and \’s to it. I am guessing this is a string representation of a number. How can i remove these symbols. Since i need to reorder the integers, and print out a list.
This is the output of the command above:
(#\1 #\2 #\3 #\4)
Here’s a function I wrote that breaks the number down by dividing by 10 each time:
Obviously this will only work with positive integers, but if you need negatives it can be easily modified.