From: "Kjetil S. Matheussen" <k.s.matheussen@notam02.no>
To: guile-user@gnu.org
Subject: Re: How to use guardians
Date: Thu, 13 Mar 2008 16:02:36 +0100 (CET) [thread overview]
Message-ID: <Pine.LNX.4.64.0803131602190.2451@ttleush> (raw)
Thien-Thi Nguyen:
> (das-guardian (list cleanup-func object)))
>
> Here, you add the compound object (constructed using `list'),
> not just `object'. Is that what you want do, really?
Ah, of course. Thank you very much. Also for the mysteriously
quick reply. :-)
I have now changed "add-guardian-object" into:
(define das-guardians '())
(define (add-guardian-object object cleanup-func)
(set! das-guardians
(remove (lambda (das-guardian)
(let ((guard ((cadr das-guardian))))
(and guard
(begin
((car das-guardian) guard)
#t))))
das-guardians))
(push! (list cleanup-func
(let ((guardian (make-guardian)))
(guardian object)
guardian))
das-guardians))
And this seems to work. Great!
next reply other threads:[~2008-03-13 15:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-13 15:02 Kjetil S. Matheussen [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-03-13 14:12 How to use guardians Kjetil S. Matheussen
2008-03-13 14:19 ` Thien-Thi Nguyen
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/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0803131602190.2451@ttleush \
--to=k.s.matheussen@notam02.no \
--cc=guile-user@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).