I'm new to Arc and I'd like to split a string into a list of characters to access the car and cdr of the list. Is there a way to do this?
— dpk.
arc> (coerce "abc" 'cons) (#\a #\b #\c) arc> (car (coerce "abc" 'cons)) #\a arc> (cdr (coerce "abc" 'cons)) (#\b #\c)
arc> (coerce (list #\a #\b #\c) 'string) "abc"
arc> (inc #\a) #\b arc> (inc #\b) #\c arc> (inc #\c) #\d arc> (map inc "abc") "bcd" arc> (each character "abc" (prn character "!")) a! b! c! nil
-----