unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Bill Schottstaedt <bil@ccrma.Stanford.EDU>
Subject: invalid args to define*
Date: Mon, 15 Mar 2004 04:16:13 -0800	[thread overview]
Message-ID: <40559E8D.2020307@ccrma> (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


             reply	other threads:[~2004-03-15 12:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-15 12:16 Bill Schottstaedt [this message]
2004-03-21  2:26 ` invalid args to define* Marius Vollmer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40559E8D.2020307@ccrma \
    --to=bil@ccrma.stanford.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).