[Scheme-reports] practical matters - CSAN
Alex Shinn
(23 Aug 2011 02:31 UTC)
|
Re: practical matters - CSAN
Arthur A. Gleckler
(23 Aug 2011 02:59 UTC)
|
Re: [Scheme-reports] practical matters - CSAN
John Cowan
(23 Aug 2011 04:57 UTC)
|
Re: [Scheme-reports] practical matters - CSAN
Aubrey Jaffer
(23 Aug 2011 21:55 UTC)
|
Re: [Scheme-reports] practical matters - CSAN
Alex Shinn
(24 Aug 2011 00:09 UTC)
|
Re: [Scheme-reports] practical matters - CSAN
John Cowan
(24 Aug 2011 01:17 UTC)
|
Re: [Scheme-reports] practical matters - CSAN
Alex Shinn
(24 Aug 2011 01:58 UTC)
|
Re: [Scheme-reports] practical matters - CSAN
Aubrey Jaffer
(27 Aug 2011 02:58 UTC)
|
Re: [Scheme-reports] practical matters - CSAN
John Cowan
(28 Aug 2011 04:41 UTC)
|
Re: [Scheme-reports] practical matters - CSAN
Aubrey Jaffer
(29 Aug 2011 16:19 UTC)
|
Re: [Scheme-reports] practical matters - CSAN
Aaron W. Hsu
(29 Aug 2011 16:31 UTC)
|
Re: [Scheme-reports] practical matters - CSAN Aubrey Jaffer (07 Sep 2011 00:19 UTC)
|
| Date: Mon, 29 Aug 2011 12:31:23 -0400 | From: "Aaron W. Hsu" <arcfide@sacrideo.us> | | On Mon, 29 Aug 2011 12:16:40 -0400, Aubrey Jaffer <agj@alum.mit.edu> wrote: | | > This would seem like a good application for multiple-value returns: | > SCANF-READ would return the number of format directives matched | > followed by the objects read. But LET-VALUES, LET*-VALUES, and | > (srfi-8) RECEIVE expect the number of bindings to match the number of | > return values. They can't be used if the number of return values is | > not known in advance. | | This does not hold for the normal implementations of LET-VALUES or | LET*-VALUES. In both cases, if you do not know how many bindings you will | receive, you can do the following: | | (let-values ([x (values 1 2 3)]) | (length x)) | ; => 3 Converting multiple values to a list is more cumbersome than just returning a list in the first place. _______________________________________________ Scheme-reports mailing list Scheme-reports@scheme-reports.org http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports