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: seq-some-p and nil Date: Wed, 09 Sep 2015 09:56:41 +0200 Message-ID: <87y4ggf2km.fsf@petton.fr> References: <1441295429.4215.0@smtp.gmail.com> <87si6vl21r.fsf@petton.fr> <878u8k2vnp.fsf@udel.edu> <878u8i69ok.fsf@petton.fr> <674102d7-0e97-478a-af05-ca6d82c17c28@default> <87mvwym01x.fsf@petton.fr> <87h9n5mloa.fsf@petton.fr> <8737ypm547.fsf@petton.fr> <87pp1s976u.fsf@fencepost.gnu.org> <3dc0f1d9-caf1-446a-ab14-2b3e210a02e7@default> <87r3m8lop9.fsf@petton.fr> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1441785441 26171 80.91.229.3 (9 Sep 2015 07:57:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 9 Sep 2015 07:57:21 +0000 (UTC) Cc: Mark Oteiza , emacs-devel@gnu.org To: Drew Adams , David Kastrup , Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 09 09:57:05 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 1ZZaFW-0006Ki-TS for ged-emacs-devel@m.gmane.org; Wed, 09 Sep 2015 09:56:59 +0200 Original-Received: from localhost ([::1]:40580 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZaFR-0004Yc-EX for ged-emacs-devel@m.gmane.org; Wed, 09 Sep 2015 03:56:53 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45238) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZaFN-0004YT-Dq for emacs-devel@gnu.org; Wed, 09 Sep 2015 03:56:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZZaFK-0004Gd-7m for emacs-devel@gnu.org; Wed, 09 Sep 2015 03:56:49 -0400 Original-Received: from out4-smtp.messagingengine.com ([66.111.4.28]:36014) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZaFK-0004Dl-42 for emacs-devel@gnu.org; Wed, 09 Sep 2015 03:56:46 -0400 Original-Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 925A521713 for ; Wed, 9 Sep 2015 03:56:44 -0400 (EDT) Original-Received: from frontend1 ([10.202.2.160]) by compute3.internal (MEProxy); Wed, 09 Sep 2015 03:56:44 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=urHAVeGSJ+QnXMIPKLKR4axiZts=; b=EB/Pe K4y7u7x4VYedsTG8epCoukf/0+W+2jewmNzm5bgbndSjoISoF+7zsYwhaUc2Kwbx nbPHKJF4yAyZ7eH8UiRmkqI2Yl1B8ngyGdgoBC7GkIrBBP+WmM6VgSOPcEjLDp1S mFUyWBWNCzd9Kemio6N1KK3QvJi2afTOPBboyU= X-Sasl-enc: nd9fZ0eGN5aIri2BxbCoYEyaqlDKYNzYlBZYTTSkTR2u 1441785404 Original-Received: from blueberry (89-156-196-194.rev.numericable.fr [89.156.196.194]) by mail.messagingengine.com (Postfix) with ESMTPA id B99F9C00286; Wed, 9 Sep 2015 03:56:43 -0400 (EDT) In-Reply-To: User-Agent: Notmuch/0.19 (http://notmuchmail.org) Emacs/25.0.50.4 (x86_64-unknown-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 66.111.4.28 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:189754 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Drew Adams writes: >> > Was there something wrong with the suggestion to return, >> > as the non-nil value, a cons (ELEMENT . VALUE)? >> > >> > (Where ELEMENT is the sequence element that satisfies the >> > predicate, and VALUE is the return value of the predicate >> > for that element.) >> > >> > That gives you "some" element that satisfies the predicate >> > (the first such). And it gives you the result of the test. >> > Each of these can be useful, depending on the context. >>=20 >> It would work, and I believe Scheme has a similar function, but I don't >> want seq-some to have this extra complexity. It could be another >> function though, just like in Scheme. > > What extra complexity? It creates one cons cell which has as its > car and cdr things that presumably already exist. I meant extra complexity for the user. If seq-some was returning a value, I wouldn't expect it to be a cons cell, I'd almost always want the element of the sequence straight away. Nico =2D-=20 Nicolas Petton http://nicolas-petton.fr --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: GPGTools - http://gpgtools.org iQEcBAEBCAAGBQJV7+Y6AAoJECM1h6R8IHkQmz8H/2/yKFpMkIDtXYQ6odxG1iMz FhGk3uY13HHJodvk6Ralm0W9dYtvBY+dHxZDoBRx4feQY9xAU5cfA8yx5prNhERy GVwSh0+GuuqYZkalVqhQT6k+aofTYZJPRM3Ez0gfXyJvEdM6vmrfPxRhPy1FeQRP 8GZtsCN8dZRVXsTrsist5xxSchjqpvPTVE+H/WNi2KhNgzmKn8eb+jF7SX4Ulu7A EjH0s41dum0kNXJACTFYnMKE58cg77IL01QNHH9lW6B21kOIZsuedQDpvBqZ2iCT KZ15R9nIXcXXL8mjJX0cMr9v2JLFzqkhFi0ABjxYXH+EdW/0fPRZEzL21EeTUtg= =9nJG -----END PGP SIGNATURE----- --=-=-=--