unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "achambers.home@googlemail.com" <achambers.home@googlemail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Effective use of destructive functions
Date: 12 Apr 2007 08:27:48 -0700	[thread overview]
Message-ID: <1176391668.711687.159240@n76g2000hsh.googlegroups.com> (raw)
In-Reply-To: <877isikq10.fsf@voyager.informatimago.com>

On 12 Apr, 08:31, Pascal Bourguignon <p...@informatimago.com> wrote:

> (let ((result (make-list 10 0)))
>    (print (map-into result (function +) '(1 2 3 4 5 6)
>                                         '(100 200 300 400 500 600 700 800)))
>    (print (map-into result (function *) result '(2 2 2 3 3 3)))
>    (map-into result (lambda (x) (+ 1000 x)) result))
>
> (101 202 303 404 505 606 0 0 0 0)
>
> (202 404 606 1212 1515 1818 0 0 0 0)
> (1202 1404 1606 2212 2515 2818 1000 1000 1000 1000)

I'm starting to think that it might be easier to keep a handle on the
root widget then transform that back into the xml tree whenever you
need to actually write it out to a file.  That seems like the more
functional
way to do it.

Cheers,
Andy

      reply	other threads:[~2007-04-12 15:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-11 23:42 Effective use of destructive functions achambers.home
2007-04-12  7:31 ` Pascal Bourguignon
2007-04-12 15:27   ` achambers.home [this message]

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=1176391668.711687.159240@n76g2000hsh.googlegroups.com \
    --to=achambers.home@googlemail.com \
    --cc=help-gnu-emacs@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.
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).