chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] Keyword parameters bug?


From: Alonso Andres
Subject: [Chicken-users] Keyword parameters bug?
Date: Tue, 14 Apr 2009 13:15:56 -0300

It seems there is a bug in Chicken (I'm using version 4.0) when using
procedures with keywords parameters.

Example:

----------[$ csi]
#;1> (define (test-proc #!key some-arg string) (display some-arg)
(newline) (display string) (newline))
#;2> (test-proc some-arg: "X" string: "Y")
X
#<procedure (string . chars1001)>
----------

The "string" parameter is not creating a local definition, it's the
top level STRING procedure instead, contrary to what it's expected
when using required parameters:

----------[$ csi]
#;3> (define (test-proc some-arg string) (display some-arg) (newline)
(display string) (newline))
#;4> (test-proc "X" "Y")
X
Y
----------


        Alonso




reply via email to

[Prev in Thread] Current Thread [Next in Thread]