From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Newsgroups: gmane.emacs.help Subject: Re: How to flatten a one-level-deep list? Date: Wed, 18 May 2016 10:21:23 +0200 Message-ID: <20160518082123.GB4640@tuxteam.de> References: <877fes54pz.fsf@mbork.pl> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; x-action=pgp-signed X-Trace: ger.gmane.org 1463559740 28387 80.91.229.3 (18 May 2016 08:22:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 18 May 2016 08:22:20 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed May 18 10:22:15 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1b2wkA-00014G-B1 for geh-help-gnu-emacs@m.gmane.org; Wed, 18 May 2016 10:22:14 +0200 Original-Received: from localhost ([::1]:43587 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2wk9-0003Uc-Ey for geh-help-gnu-emacs@m.gmane.org; Wed, 18 May 2016 04:22:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59319) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2wjX-0003Tn-Im for help-gnu-emacs@gnu.org; Wed, 18 May 2016 04:21:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b2wjU-0000wn-AN for help-gnu-emacs@gnu.org; Wed, 18 May 2016 04:21:35 -0400 Original-Received: from mail.tuxteam.de ([5.199.139.25]:40308 helo=tomasium.tuxteam.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2wjU-0000wT-3V for help-gnu-emacs@gnu.org; Wed, 18 May 2016 04:21:32 -0400 Original-Received: from tomas by tomasium.tuxteam.de with local (Exim 4.80) (envelope-from ) id 1b2wjL-0001Kt-Eu for help-gnu-emacs@gnu.org; Wed, 18 May 2016 10:21:23 +0200 In-Reply-To: <877fes54pz.fsf@mbork.pl> User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 5.199.139.25 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:110043 Archived-At: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wed, May 18, 2016 at 07:12:56AM +0200, Marcin Borkowski wrote: > Hi, > > I have a list of lists of atoms, and I want to have a flat list > containing these atoms. I could use -flatten from dash.el, but I'd > prefer not to introduce such a dependency for this one function alone. > Is there anything *in core Emacs* to do it, or should I just write my > own version? (setq l '((a b c) (d e f) (g h i))) (apply 'append l) => (a b c d e f g h i) No idea whether performance or edge cases match your requirements, though :) regards - -- t -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlc8JgMACgkQBcgs9XrR2ka6eACfe2VkMvr3Y/asv+Zj+gv2RX3l sYUAn1gNe9Uozr3NSG2JlmMwIjk9UFaK =N+Pt -----END PGP SIGNATURE-----