2017-03-26 2 views

Répondre

1

La fonction builtin mapconcat est couramment utilisé pour cela, par exemple.

(mapconcat 'number-to-string (number-sequence 0 5 1) ",") 
0

Que diriez-vous ...

(s-join "," (mapcar #'number-to-string ls))?

Voici une fonction simple. Cela devrait fonctionner tant que vos arguments d'entrée sont bien formés.

(defun my/join-list-with (separator lst) 
    (s-join separator (mapcar #'number-to-string lst))) 

(my/join-list-with "," '(0 1 2 3 4 5)) 
"0,1,2,3,4,5"