This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: values (Re: R5RS)
Michael Livshin <mlivshin@bigfoot.com> writes:
> "Jorgen `forcer' Schaefer" <forcer@mindless.com> writes:
>
> > (define values list)
> > (define call-with-values apply)
Correction, this should have been
(define (call-with-values producer consumer)
(apply (producer) consumer))
> > would be a valid implementation -- though suboptimal.
>
> no, it wouldn't. R5RS also introduces the concept of continuations
> which expect values (inevitable, really), so you also have to redefine
> call/cc and dynamic-wind to do the right thing.
from R5RS Sect. 6:
| Except for continuations created by the call-with-values
| procedure, all continuations take exactly one value.
Could you please explain how exactly the implementation given
above would break?
-- forcer
--
((email . "forcer@mindless.com") (www . "http://forcix.cx/")
(irc . "forcer@#StarWars (IRCnet)") (gpg . "/other/forcer.gpg"))