From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Side effects of `sort' Date: Thu, 01 Mar 2012 17:25:07 -0500 Message-ID: References: <8762eoum93.fsf@schoepe.localhost> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1330640719 8751 80.91.229.3 (1 Mar 2012 22:25:19 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 1 Mar 2012 22:25:19 +0000 (UTC) Cc: emacs-devel@gnu.org To: Dave Abrahams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 01 23:25:19 2012 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 1S3ER4-0001hS-NM for ged-emacs-devel@m.gmane.org; Thu, 01 Mar 2012 23:25:18 +0100 Original-Received: from localhost ([::1]:56980 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S3ER3-0007hs-P2 for ged-emacs-devel@m.gmane.org; Thu, 01 Mar 2012 17:25:17 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:38120) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S3ER0-0007hC-8K for emacs-devel@gnu.org; Thu, 01 Mar 2012 17:25:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S3EQx-00025h-Mx for emacs-devel@gnu.org; Thu, 01 Mar 2012 17:25:13 -0500 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:32837) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S3EQx-00025A-Iq for emacs-devel@gnu.org; Thu, 01 Mar 2012 17:25:11 -0500 Original-Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id q21MP8dg017600; Thu, 1 Mar 2012 17:25:08 -0500 Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id F3CCCB4166; Thu, 1 Mar 2012 17:25:07 -0500 (EST) In-Reply-To: (Dave Abrahams's message of "Thu, 01 Mar 2012 16:04:19 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4148=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4148> : streams <733820> : uri <1075168> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.22 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:148870 Archived-At: > Lisp doesn't really have access to "the input list" in any real sense: > (sort (identity x)) > do you expect x to be rebound? It doesn't hav access to `x' but it has access to the list, obviously. If the input is nil, the output is nil, and if the input is a cons, the output could be the same cons. It just means that `sort' would have to fiddle not only with `cdr's but also with the `car's. Not worth the trouble, tho. Stefan