unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* call/cc oddness
@ 2009-09-17 14:25 Bill Schottstaedt
  2009-09-17 17:49 ` Neil Jerram
  0 siblings, 1 reply; 2+ messages in thread
From: Bill Schottstaedt @ 2009-09-17 14:25 UTC (permalink / raw)
  To: bug-guile

Is this a bug?

scheme@(guile-user)> (call/cc (lambda (a . b) (a 1)))
1
scheme@(guile-user)> (call/cc (lambda arg ((car arg) 1)))
1
scheme@(guile-user)> (call/cc (lambda (a b) (a 1)))
ERROR: Wrong number of arguments to #<program 8bf5330 at standard input:3:9 (a b)>

r5rs.html and r6rs.html say "Proc must be a procedure of one argument" -- perhaps
ambiguous?





^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: call/cc oddness
  2009-09-17 14:25 call/cc oddness Bill Schottstaedt
@ 2009-09-17 17:49 ` Neil Jerram
  0 siblings, 0 replies; 2+ messages in thread
From: Neil Jerram @ 2009-09-17 17:49 UTC (permalink / raw)
  To: Bill Schottstaedt; +Cc: bug-guile

"Bill Schottstaedt" <bil@ccrma.Stanford.EDU> writes:

> Is this a bug?

I'd say not.  It looks like a useful generalization.

> scheme@(guile-user)> (call/cc (lambda (a . b) (a 1)))
> 1
> scheme@(guile-user)> (call/cc (lambda arg ((car arg) 1)))
> 1
> scheme@(guile-user)> (call/cc (lambda (a b) (a 1)))
> ERROR: Wrong number of arguments to #<program 8bf5330 at standard input:3:9 (a b)>
>
> r5rs.html and r6rs.html say "Proc must be a procedure of one argument" -- perhaps
> ambiguous?

Whereas what we implement is "Proc must be a procedure that can accept a
single argument".

    Neil




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-09-17 17:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-17 14:25 call/cc oddness Bill Schottstaedt
2009-09-17 17:49 ` Neil Jerram

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).