Create a list from a string in Clojure

You can just use seq function to do this:

user=> (seq "aaa")
(\a \a \a)

for numbers you can use “dumb” solution, something like:

user=> (map (fn [^Character c] (Character/digit c 10)) (str 12345))
(1 2 3 4 5)

P.S. strings in clojure are ‘seq’able, so you can use them as source for any sequence processing functions – map, for, …

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)