From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.lisp.guile.devel Subject: Re: let-keywords? Date: Tue, 12 Dec 2006 10:35:17 +1100 Message-ID: <8764cihuq2.fsf@zip.com.au> References: NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1165880132 26869 80.91.229.10 (11 Dec 2006 23:35:32 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 11 Dec 2006 23:35:32 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Dec 12 00:35:29 2006 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by dough.gmane.org with esmtp (Exim 4.50) id 1GtugD-0003Sk-3S for guile-devel@m.gmane.org; Tue, 12 Dec 2006 00:35:29 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GtugC-00041G-HL for guile-devel@m.gmane.org; Mon, 11 Dec 2006 18:35:28 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Gtug8-000400-0M for guile-devel@gnu.org; Mon, 11 Dec 2006 18:35:24 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Gtug5-0003yP-1I for guile-devel@gnu.org; Mon, 11 Dec 2006 18:35:22 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gtug4-0003yK-Nn for guile-devel@gnu.org; Mon, 11 Dec 2006 18:35:20 -0500 Original-Received: from [61.8.2.215] (helo=mailout1.pacific.net.au) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Gtug4-0005oC-Ig for guile-devel@gnu.org; Mon, 11 Dec 2006 18:35:20 -0500 Original-Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout1.pacific.net.au (Postfix) with ESMTP id 3BD7B5AFDCA; Tue, 12 Dec 2006 10:35:18 +1100 (EST) Original-Received: from localhost (ppp271C.dyn.pacific.net.au [61.8.39.28]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id B12D22740B; Tue, 12 Dec 2006 10:35:17 +1100 (EST) Original-Received: from gg by localhost with local (Exim 4.63) (envelope-from ) id 1Gtug1-0001gE-Ja; Tue, 12 Dec 2006 10:35:17 +1100 Original-To: hanwen@xs4all.nl Mail-Copies-To: never In-Reply-To: (Han-Wen Nienhuys's message of "Mon, 11 Dec 2006 16:37:25 +0100") User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:6311 Archived-At: Han-Wen Nienhuys writes: > > I think that ice-9's let-keyword* macro is the thing that I've been > looking for, but I haven't been able to work out how to use it. I think it goes like (let-keywords '(#:foo "hello" #:xyzzy "world") #t ((foo "default for foo") (bar "default for bar")) foo => "hello" bar => "default for bar" "allow-other-keywords" is whether it's an error to have something unknown like #:xyzzy in the args. I think the "let-keywords*" variant allows the default for one variable to use the value of a previous one. (let-keywords* '(#:foo 1 #:xyzzy 2) #t ((foo 1) (bar (+ foo 2))) foo => 1 bar => 3 Would those help for the manual, or can anyone think of more typical or clearer samples? _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel