[gambit-list] keyword argument: unspecified, or specified to #f?

Matthew Koichi Grimes mkg at cs.nyu.edu
Sun Jun 19 18:28:17 EDT 2011


When a keyword argument is left unspecified, it is initialized to #f. This
can get weird for optional boolean arguments. For example:

Example:

> (define (my-func #!key bool-arg) (if bool-arg bool-arg "bool-arg
unspecified"))
> (my-func bool-arg: #t)
#t
> (my-func)
"bool-arg unset"
> (my-func bool-arg: #f)
"bool-arg unset"

Is there any way to distinguish between keyword arguments that were never
set, and keyword arguments that were set to #f?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20110619/5a4dbccf/attachment.htm>


More information about the Gambit-list mailing list