atom_charscan convert an atom into the list of its constituent letters, or vice-versa. A fairly broad concept of atom is used: this predicate will glue together (or split up) any reasonable characters you give it. A possible list would be to put together a list of letters read, one character at a time, to make a word - that is, an atom whose name is the word. Examples:
?- atom_chars(pizza, List). List = [p, i, z, z, a] ?- atom_chars(Atom, [b, e, e, r]). Atom = beer ?- atom_chars(2007, List). List = ['2', '0', '0', '7'] ?- atom_chars(Atom, ['[', '3', ' ', ',', '4', ']']). Atom = '[3 ,4]'