| Sunnan 2004-03-27, 12:25 am |
| There is no way, right? I was trying to define something I call
''svalues'', which is like values but it delivers only its first value
to its continuation if that continuation wasn't created by
call-with-values or a macro upon that (in which case it should work just
like regular values). So, can it be done? I found an older message on
this group, <357D747E AAECE33E ccs neu edu>, which seems to imply that
the pred ''current-continuation-accepts-multiple-values?'' can't easily
be written in Scheme.
The reason it came up was that I'm reading through Graham's _On Lisp_
(which uses Common Lisp rather than Scheme for most of it's examples)
and I thought it was interesting that Common Lisp just threw away all
but the first instead of erroring, unless using ''multiple-values-bind''
(which to me seemed to be exactly like ''receive'' as defined in SRFI-8).
(BTW, I am aware that I could program in CPS instead but this is also
intended as curiosa.)
One love, Sunnan.
|