From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nicolas Petton Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] sequence manipulation functions Date: Wed, 12 Nov 2014 20:30:13 +0100 Message-ID: <87k330cj3u.fsf@gmail.com> References: <87oasmmwzt.fsf@gmail.com> <87bnolslph.fsf@gmail.com> <87zjc2dic0.fsf@gmail.com> <87ioimtzu0.fsf@gmail.com> <87lhngcnrc.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1415820636 1389 80.91.229.3 (12 Nov 2014 19:30:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 12 Nov 2014 19:30:36 +0000 (UTC) Cc: Stefan Monnier , Emacs developers To: Bozhidar Batsov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 12 20:30:31 2014 Return-path: Envelope-to: ged-emacs-devel@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 1Xodca-0002Mo-3a for ged-emacs-devel@m.gmane.org; Wed, 12 Nov 2014 20:30:28 +0100 Original-Received: from localhost ([::1]:56459 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XodcZ-000406-OH for ged-emacs-devel@m.gmane.org; Wed, 12 Nov 2014 14:30:27 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41994) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XodcT-0003z7-CK for emacs-devel@gnu.org; Wed, 12 Nov 2014 14:30:26 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XodcO-00013W-Mt for emacs-devel@gnu.org; Wed, 12 Nov 2014 14:30:21 -0500 Original-Received: from mail-lb0-x22f.google.com ([2a00:1450:4010:c04::22f]:43069) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XodcO-00013D-Bw for emacs-devel@gnu.org; Wed, 12 Nov 2014 14:30:16 -0500 Original-Received: by mail-lb0-f175.google.com with SMTP id n15so10107063lbi.34 for ; Wed, 12 Nov 2014 11:30:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version:content-type:content-transfer-encoding; bh=9haezee+diZPrUk/WZWyAsYG7ARoXgEElWl/reXq1mM=; b=N8742hv3YryHjP0rzf7Yy62EVVc6FvX0TgzUgDtmry9s3QSPPIy2OyOavkmuw7kO+j AtmT4UTQ0t9vITCO/sbc1lBHE5d8p3DidQp7hNf+LwJT5mX/JgBTQ+gQKMjSde/8KyWk mOF8ol27u+gLneirUb/jiaHZCsu+ejt7pdPKUiKQclW5afma6P/CBYeUdveTyZCOv4kX sfbuhnt2O9g1lNR7hTBTdjbBT2TyIzzZZbkq1aptP7QUb54RExfi9F0yzz3h0VEZLHIK 8ZRPiy59Q531uRpAATv1CTKD/c6rAaaX7Ciq3b/b6sghcsLoI698AOX8J7IK0uHWk95n Kb0g== X-Received: by 10.152.25.226 with SMTP id f2mr3666290lag.98.1415820615185; Wed, 12 Nov 2014 11:30:15 -0800 (PST) Original-Received: from blueberry (c213-89-134-104.bredband.comhem.se. [213.89.134.104]) by mx.google.com with ESMTPSA id z5sm6916066lae.21.2014.11.12.11.30.13 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Nov 2014 11:30:14 -0800 (PST) User-agent: mu4e 0.9.9.6pre3; emacs 24.3.1 In-reply-to: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c04::22f X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:176839 Archived-At: Bozhidar Batsov writes: > I don’t see here common sequence functions like take-while, > drop-while, remove (the opposite of filter), mapcat, flatten, etc. There are indeed missing functions. As I initially planned to add these functions without any prefix and propose the change in subr.el, I didn't want to add too many of them at once, but now I can definitely add the missing ones. seq-take and seq-drop were rejected though, so I don't think take-while or drop-while make much sense anymore. Or? > Anyways, for the prefixing to make sense functions like mapcar, mapc > and friends should be aliased as well (ideally with names like > `seq-map`, `sea-each`, etc). Yes, I did alias them. I aliased mapc to seq-do though. > > Another thing to consider - if you want the library to be adopted > quickly it might make sense to distribute it as a ELPA package for > older Emacsen. That's a very good point! Nico > > — > Cheers, > Bozhidar > > On November 12, 2014 at 19:50:16, Nicolas Petton (petton.nicolas@gmail.com) wrote: > > > Stefan Monnier writes: > >>> Fair enough. One question though, if sequences.el is not preloaded, then >>> I guess these functions should not be documented in the manual? >> >> Why not? Just state that they need a (require 'seq) before you can >> use them. > > Should I put it in the Elisp manual in sequences.texi? > > Nicolas -- Nicolas Petton http://nicolas-petton.fr