I'm with Benjamin despite my last post...
On 19/07/2011, at 2:31 PM, Benjamin Esham wrote:
> Tuba Lambanog wrote:
>
>> Tuba Lambanog wrote:
>>
>>> Hello, My apologies for this newbie question. I couldn't find a way to
>>> convert a string to a set, thus:
>>>
>>> "abc" => #{a b c}
>>
>> (set "abc") gives me #{\a \b \c}. I'm expecting instead: #{a b c}
>
> Hi Tuba,
>
> Are you quite sure that #{\a \b \c} is not what you want? In Clojure's
> notation, a backslashed character [more or less] refers to a
> single-character string--something akin to the char type from C. Hence \a is
> the character a. On the other hand #{a b c} is a set containing three
> Clojure symbols, which is probably not what you want.
>
> (If you want to be using a, b, and c as some kind of identifiers, take a
> look at keywords.)
>
> --
> Benjamin D. Esham | [email protected] | www.bdesham.info
> How to Ask Questions the Smart Way, by Eric S. Raymond:
> http://catb.org/~esr/faqs/smart-questions.html
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to [email protected]
> Note that posts from new members are moderated - please be patient with your
> first post.
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en