string - SWI-Prolog: splitting text atom into list of characters -


very simple question: know there plenty of ways split atom, eg 'example atom' on delimiter, eg ' ' -> ['example', 'atom'] there way split every character? eg ['e', 'x', 'a', ... 'o', 'm']. i've tried

atomic_list_concat(list, '', atom), 

but generates error

error: atomic_list_concat/3: domain error: `non_empty_atom' expected, found `' 

what recommend?

do want this?

http://www.swi-prolog.org/pldoc/doc_for?object=atom_chars/2

?- atom_chars(hello, x). x = [h, e, l, l, o]. 

Comments