unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* (ice-9 optargs) lambda* and define* #:rest broken
@ 2004-05-26 16:00 Clinton Ebadi
  2004-08-09 22:13 ` Marius Vollmer
  0 siblings, 1 reply; 2+ messages in thread
From: Clinton Ebadi @ 2004-05-26 16:00 UTC (permalink / raw)



[-- Attachment #1.1: Type: text/plain, Size: 458 bytes --]

(define foo (lambda* (#:key (atts '()) #:rest rest) (format #t "Atts:
~S; Rest: ~S~%" atts rest)))

(foo #:atts '(1 2 3) 'foo 'bar)
] Atts: (1 2 3); Rest: (#:atts (1 2 3) foo bar)

The same occurs with define*, the keyword arguments are not removed from
the rest list. This is broken in 1.6.x and CVS HEAD.

-- 
http://unknownlamer.org
AIM:unknownlamer IRC:unknown_lamer@freenode#hprog
I use Free Software because I value freedom over features.

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 136 bytes --]

_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-guile

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

* Re: (ice-9 optargs) lambda* and define* #:rest broken
  2004-05-26 16:00 (ice-9 optargs) lambda* and define* #:rest broken Clinton Ebadi
@ 2004-08-09 22:13 ` Marius Vollmer
  0 siblings, 0 replies; 2+ messages in thread
From: Marius Vollmer @ 2004-08-09 22:13 UTC (permalink / raw)
  Cc: bug-guile

Clinton Ebadi <clinton@unknownlamer.org> writes:

> (define foo (lambda* (#:key (atts '()) #:rest rest) (format #t "Atts:
> ~S; Rest: ~S~%" atts rest)))
>
> (foo #:atts '(1 2 3) 'foo 'bar)
> ] Atts: (1 2 3); Rest: (#:atts (1 2 3) foo bar)

This is the behavior that Common Lisp specifies, so we will have to
argue whether it really is a bug of Guile to behave this way.

In fact, the above is probably a bug, but a different from yours: the
'foo 'bar arguments should raise an error since they are not a
keyword-value pair.

-- 
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3  331E FAF8 226A D5D4 E405


_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile


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

end of thread, other threads:[~2004-08-09 22:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-26 16:00 (ice-9 optargs) lambda* and define* #:rest broken Clinton Ebadi
2004-08-09 22:13 ` Marius Vollmer

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).