Re: Emacs Lisp's "mapconcat" in Common Lisp?

Liste des GroupesRevenir à cl lisp 
Sujet : Re: Emacs Lisp's "mapconcat" in Common Lisp?
De : 643-408-1753 (at) *nospam* kylheku.com (Kaz Kylheku)
Groupes : comp.lang.lisp comp.lang.scheme
Date : 31. Aug 2024, 08:19:55
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20240830231523.789@kylheku.com>
References : 1 2
User-Agent : slrn/pre1.0.4-9 (Linux)
On 2024-08-30, B. Pym <Nobody447095@here-nor-there.org> wrote:
Shorter:
>
(define (mapconcat fun lst sep)
  (string-join (map (compose x->string fun) lst) (x->string sep)))

"Concatenate" is a pleonasm for "catenate", which is based on a
Latin root for "chain". Chaining is implicitly together ("con").
Even the Unix dolts understood this, so we have /bin/cat
and strcat, and not /bin/concat and strconcat.

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca

Date Sujet#  Auteur
31 Aug 24 * Re: Emacs Lisp's "mapconcat" in Common Lisp?3B. Pym
31 Aug 24 `* Re: Emacs Lisp's "mapconcat" in Common Lisp?2B. Pym
31 Aug 24  `- Re: Emacs Lisp's "mapconcat" in Common Lisp?1Kaz Kylheku

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal