Re: converting a string to a list

2012-01-16 Thread Samuel Lê
Thanks for the answsers! Jay's last answer is just what I was looking for. thanks, Sam 2012/1/14 Jay Fields j...@jayfields.com 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)

converting a string to a list

2012-01-14 Thread Samuel Lê
Hi, I was wondering if there was a function to convert a list into a string, something like: (string-to-list abcde) ;; (a b c d e) thanks! Sam -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Re: converting a string to a list

2012-01-14 Thread 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, 2012 at 10:13, Samuel Lê samuel...@gmail.com wrote: Hi, I was wondering if there was a function to convert a list into a

Re: converting a string to a list

2012-01-14 Thread dennis zhuang
You can do this ((comp #(map str %) seq) abcdef) (a b c d e f) 2012/1/15 Bruce Durling b...@otfrom.com 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

Re: converting a string to a list

2012-01-14 Thread 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= (apply str [a b c]) abc' But, the example is looks like it wants user= (map (comp symbol str) abc) (a b c) Hopefully one of those

Re: converting a string to a list

2012-01-14 Thread Andy Fingerhut
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