unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Dave Abrahams <dave@boostpro.com>
Cc: emacs-devel@gnu.org
Subject: Re: Side effects of `sort'
Date: Thu, 01 Mar 2012 17:25:07 -0500	[thread overview]
Message-ID: <jwvobsgm040.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <m2sjhsdodo.fsf@boostpro.com> (Dave Abrahams's message of "Thu, 01 Mar 2012 16:04:19 -0500")

> 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



  parent reply	other threads:[~2012-03-01 22:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-01 19:58 Side effects of `sort' Daniel Schoepe
2012-03-01 20:52 ` Tassilo Horn
2012-03-01 21:04 ` Dave Abrahams
2012-03-01 21:34   ` Daniel Schoepe
2012-03-01 22:25   ` Stefan Monnier [this message]
2012-03-02  6:13     ` Miles Bader

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvobsgm040.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=dave@boostpro.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).