From 26fc11a2ae5023cd08c39ea226aad3a7607dd8dc Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Thu, 29 Jun 2017 17:19:06 -0500 Subject: Add SRFI 71: Extended LET-syntax for multiple values. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * module/srfi/srfi-71.scm: New file. * module/srfi/Makefile.am: Add it. * doc/ref/srfi-modules.texi: Document it. * NEWS: Update. Signed-off-by: Ludovic Courtès --- doc/ref/srfi-modules.texi | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'doc/ref/srfi-modules.texi') diff --git a/doc/ref/srfi-modules.texi b/doc/ref/srfi-modules.texi index ae1c6109c..f3caa4375 100644 --- a/doc/ref/srfi-modules.texi +++ b/doc/ref/srfi-modules.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Guile Reference Manual. -@c Copyright (C) 1996, 1997, 2000-2004, 2006, 2007-2014, 2017 +@c Copyright (C) 1996, 1997, 2000-2004, 2006, 2007-2014, 2017, 2018 @c Free Software Foundation, Inc. @c See the file guile.texi for copying conditions. @@ -58,6 +58,7 @@ get the relevant SRFI documents from the SRFI home page * SRFI-64:: A Scheme API for test suites. * SRFI-67:: Compare procedures * SRFI-69:: Basic hash tables. +* SRFI-71:: Extended let-syntax for multiple values. * SRFI-87:: => in case clauses. * SRFI-88:: Keyword objects. * SRFI-98:: Accessing environment variables. @@ -5400,6 +5401,25 @@ Answer a hash value appropriate for equality predicate @code{equal?}, @code{hash} is a backwards-compatible replacement for Guile's built-in @code{hash}. +@node SRFI-71 +@subsection SRFI-71 - Extended let-syntax for multiple values +@cindex SRFI-71 + +This SRFI shadows the forms for @code{let}, @code{let*}, and @code{letrec} +so that they may accept multiple values. For example: + +@example +(use-modules (srfi srfi-71)) + +(let* ((x y (values 1 2)) + (z (+ x y))) + (* z 2)) +@result{} 6 +@end example + +See @uref{http://srfi.schemers.org/srfi-71/srfi-71.html, the +specification of SRFI-71}. + @node SRFI-87 @subsection SRFI-87 => in case clauses @cindex SRFI-87 -- cgit v1.2.3