From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark Oteiza Newsgroups: gmane.emacs.devel Subject: Re: seq-some-p and nil Date: Tue, 8 Sep 2015 09:37:29 -0400 Message-ID: <20150908133729.GA20184@holos> References: <878u8k2vnp.fsf@udel.edu> <878u8i69ok.fsf@petton.fr> <674102d7-0e97-478a-af05-ca6d82c17c28@default> <87mvwym01x.fsf@petton.fr> <87h9n5mloa.fsf@petton.fr> <87zj0xkpx0.fsf@petton.fr> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1441719501 3567 80.91.229.3 (8 Sep 2015 13:38:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 8 Sep 2015 13:38:21 +0000 (UTC) Cc: Stefan Monnier , Drew Adams , emacs-devel@gnu.org To: Nicolas Petton Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 08 15:38:08 2015 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 1ZZJ5j-0008VB-AX for ged-emacs-devel@m.gmane.org; Tue, 08 Sep 2015 15:37:43 +0200 Original-Received: from localhost ([::1]:34114 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZJ5e-0001fF-Ce for ged-emacs-devel@m.gmane.org; Tue, 08 Sep 2015 09:37:38 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52968) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZJ5b-0001es-IC for emacs-devel@gnu.org; Tue, 08 Sep 2015 09:37:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZZJ5X-0004PH-H9 for emacs-devel@gnu.org; Tue, 08 Sep 2015 09:37:35 -0400 Original-Received: from mail-qk0-f177.google.com ([209.85.220.177]:33953) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZJ5X-0004Oi-DZ for emacs-devel@gnu.org; Tue, 08 Sep 2015 09:37:31 -0400 Original-Received: by qkfq186 with SMTP id q186so43016512qkf.1 for ; Tue, 08 Sep 2015 06:37:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=B0eFWLXXPIzKDRhTGDSaKC7JBFG1rH7tmbGC0JnQoEQ=; b=AqXzDmPL9uHUoKcv0hfBASZqVyaXU3tDv4vl5QdYhEst0SJ6iZiYfXXnF+Vda1HQXQ ZRYrPsAOdoHzLKfA7By5p7lfYeeyaRQt6tYiJ+e/TYib3DkhwcwwzpAVlwPieqt1MePQ aCtXkuophES0QCBmRVRQo2hG92nOJzV0vSXh/RdACwn7dK0mAxysTXIb1OXLYbnHuoKJ bAiLsNGKC43OI+uZnzlEzvarH9oOabQaXmMDUCzyRq7iAsBihdPk0BAejWJAlRi+RfU+ yZWVV83oG9yXJIar02qC2dCuWIf843DWgPPNs7sCW79/IfTCfvGk14UqLN5c0ca5YW4f MorA== X-Gm-Message-State: ALoCoQmBlnUNrrY2KjmLWGF5GAAwo7KySuGc1ZYTxuH0zXuyDwb9i2MAttiTU/rmz7te+So7/71j X-Received: by 10.55.192.20 with SMTP id o20mr34976377qki.44.1441719450651; Tue, 08 Sep 2015 06:37:30 -0700 (PDT) Original-Received: from holos.localdomain (c-73-128-248-14.hsd1.md.comcast.net. [73.128.248.14]) by smtp.gmail.com with ESMTPSA id t23sm1861978qkt.18.2015.09.08.06.37.29 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Sep 2015 06:37:30 -0700 (PDT) Original-Received: by holos.localdomain (Postfix, from userid 1000) id 3801168971; Tue, 8 Sep 2015 09:37:29 -0400 (EDT) Content-Disposition: inline In-Reply-To: <87zj0xkpx0.fsf@petton.fr> User-Agent: Mutt/1.5.24+9 (2dac9fa02842) (2015-08-30) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.220.177 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:189709 Archived-At: On 08/09/15 at 03:21pm, Nicolas Petton wrote: > > And defining seq-find as I did means it's always less efficient. > > It's ok, I think, for `seq-find' to reuse `seq-some'. You can't both > want to remove code duplication and be as efficient as the code you are > reusing. Why not reuse seq-find in seq-some? It at least looks (to me) a little cleaner than the other way around (defun seq-some (pred seq) (funcall pred (seq-find (pred seq)))