* invalid args to define*
@ 2004-03-15 12:16 Bill Schottstaedt
2004-03-21 2:26 ` Marius Vollmer
0 siblings, 1 reply; 2+ messages in thread
From: Bill Schottstaedt @ 2004-03-15 12:16 UTC (permalink / raw)
define* is a bit confusing in that it simply ignores invalid arguments:
/home/bil/cl/ guile
guile> (use-modules (ice-9 optargs))
guile> (define* (ho #:key a b) (list a b))
guile> (ho 1 2)
(#f #f)
guile> (ho 1 2 3 4 5)
(#f #f)
guile> (ho 1 2 3 #:a 1)
(1 #f)
In Lisp, this gives an eror:
USER(1): (defun ho (&key a b) (list a b))
HO
USER(2): (ho 1 2)
Error: 1 not a legal keyword arg.
[condition type: PROGRAM-ERROR]
Restart actions (select using :continue):
0: Ignore it.
[1c] USER(3): :exit
; Exiting Lisp
_______________________________________________
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: invalid args to define*
2004-03-15 12:16 invalid args to define* Bill Schottstaedt
@ 2004-03-21 2:26 ` Marius Vollmer
0 siblings, 0 replies; 2+ messages in thread
From: Marius Vollmer @ 2004-03-21 2:26 UTC (permalink / raw)
Cc: bug-guile
Bill Schottstaedt <bil@ccrma.Stanford.EDU> writes:
> define* is a bit confusing in that it simply ignores invalid
> arguments:
Yes. Patches welcome! :-)
--
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3 331E FAF8 226A D5D4 E405
_______________________________________________
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
end of thread, other threads:[~2004-03-21 2:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-15 12:16 invalid args to define* Bill Schottstaedt
2004-03-21 2:26 ` 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).