From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Kjetil S. Matheussen" Newsgroups: gmane.lisp.guile.user Subject: Re: How to use guardians Date: Thu, 13 Mar 2008 16:02:36 +0100 (CET) Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7BIT X-Trace: ger.gmane.org 1205420648 7766 80.91.229.12 (13 Mar 2008 15:04:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 13 Mar 2008 15:04:08 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Thu Mar 13 16:04:36 2008 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JZoyb-0000ST-34 for guile-user@m.gmane.org; Thu, 13 Mar 2008 16:04:13 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JZoy2-00063s-6w for guile-user@m.gmane.org; Thu, 13 Mar 2008 11:03:38 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JZoxx-00062W-F6 for guile-user@gnu.org; Thu, 13 Mar 2008 11:03:33 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JZoxw-00061l-OR for guile-user@gnu.org; Thu, 13 Mar 2008 11:03:33 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JZoxw-00061d-KZ for guile-user@gnu.org; Thu, 13 Mar 2008 11:03:32 -0400 Original-Received: from smtp.getmail.no ([84.208.20.33]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JZoxw-0005mE-2X for guile-user@gnu.org; Thu, 13 Mar 2008 11:03:32 -0400 Original-Received: from pmxchannel-daemon.no-osl-m323-srv-004-z2.isp.get.no by no-osl-m323-srv-004-z2.isp.get.no (Sun Java System Messaging Server 6.2-7.05 (built Sep 5 2006)) id <0JXO0013HCHVYW00@no-osl-m323-srv-004-z2.isp.get.no> for guile-user@gnu.org; Thu, 13 Mar 2008 16:03:31 +0100 (CET) Original-Received: from smtp.getmail.no ([10.5.16.1]) by no-osl-m323-srv-004-z2.isp.get.no (Sun Java System Messaging Server 6.2-7.05 (built Sep 5 2006)) with ESMTP id <0JXO00BXICGITO40@no-osl-m323-srv-004-z2.isp.get.no> for guile-user@gnu.org; Thu, 13 Mar 2008 16:02:42 +0100 (CET) Original-Received: from cm-84.215.136.96.getinternet.no ([84.215.136.96]) by no-osl-m323-srv-009-z1.isp.get.no (Sun Java System Messaging Server 6.2-7.05 (built Sep 5 2006)) with ESMTP id <0JXO00I2VCGHWS40@no-osl-m323-srv-009-z1.isp.get.no> for guile-user@gnu.org; Thu, 13 Mar 2008 16:02:42 +0100 (CET) X-X-Sender: kjetil@ttleush X-detected-kernel: by monty-python.gnu.org: Solaris 10 (beta) X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:6456 Archived-At: 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!