[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: concat with separators ?

From: Tino Calancha
Subject: Re: concat with separators ?
Date: Sun, 28 May 2017 19:52:57 +0900 (JST)
User-agent: Alpine 2.20 (DEB 67 2015-01-07)

On Sun, 28 May 2017, Jean-Christophe Helary wrote:

On May 24, 2017, at 23:34, Clément Pit-Claudel <address@hidden> wrote:

I just realized today that concat did not come with optional separators (unlike 
mapconcat). Is there a reason for that ?

I just using mapconcat when I feel that need:


(mapconcat #'identity '("a" "b" "c") "|")  => "a|b|c"

That's roughly the definition of string-join in subr-x:

(defsubst string-join (strings &optional separator)
 "Join all STRINGS using SEPARATOR."
 (mapconcat 'identity strings separator))

Would it be acceptable to provide separators to concat or is it preferable to 
use string-join instead?
The latter.
Func. `concat' accepts and arbitrary number of sequences (not a list of
sequences as `string-join').

reply via email to

[Prev in Thread] Current Thread [Next in Thread]