[plt-scheme] Word permutations - with a slight twist

From: Andrew Gwozdziewycz (apgwoz at gmail.com)
Date: Thu Jan 18 06:57:15 EST 2007

On Jan 18, 2007, at 2:13 AM, wooks wrote:

> I chose to represent the letters of the alphabet as a list because you
> can't get the length of a symbol

I'm a total n00b when it comes to scheme, but I do know that symbol- 
 >string and string->symbol allow you to convert
symbols to strings and strings to symbols respectively. Take this  
example:

 > (symbol->string 'x)
"x"
 > (string-length (symbol->string 'x))
1
 >
 > (symbol? (string->symbol "hello"))
#t
 >

Hope this helps.


--
Andrew Gwozdziewycz
apgwoz at gmail.com
http://and.rovir.us  |  http://www.photub.com  |  http://www. 
23excuses.com



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20070118/dc8872f3/attachment.html>

Posted on the users mailing list.