Add List.to_atoms method