Thanks for the answsers!
Jay's last answer is just what I was looking for.
thanks,
Sam
2012/1/14 Jay Fields
> this seems easier...
>
> user=> (map str "abc")
> ("a" "b" "c")
>
> Though the original question says a list to a string and the example shows
> a string to a list (of symbols)
>
> user
This may not be important for your application, but if what you want in the
returned sequence are strings, and if you expect to deal with Unicode
characters that are not in the Basic Multilingual Plane (BMP) set, then
note the following differences.
(map str s) will return a separate string for ea
this seems easier...
user=> (map str "abc")
("a" "b" "c")
Though the original question says a list to a string and the example shows a
string to a list (of symbols)
user=> (apply str ["a" "b" "c"])
"abc'
But, the example is looks like it wants
user=> (map (comp symbol str) "abc")
(a b c)
Hop
You can do this
> ((comp #(map str %) seq) "abcdef")
("a" "b" "c" "d" "e" "f")
2012/1/15 Bruce Durling
> Sam,
>
> Strings can be turned into sequences with seq.
>
> > (seq "foo")
> (\f \o \o)
>
> The backslashes are because f o and o are character literals.
>
> cheers,
> Bruce
>
> On Sat, Jan 14
Sam,
Strings can be turned into sequences with seq.
> (seq "foo")
(\f \o \o)
The backslashes are because f o and o are character literals.
cheers,
Bruce
On Sat, Jan 14, 2012 at 10:13, Samuel Lê wrote:
> Hi,
>
> I was wondering if there was a function to convert a list into a string,
> somethi