[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] [PATCH] DSSSL keyword args combined with rest and
Re: [Chicken-hackers] [PATCH] DSSSL keyword args combined with rest and optional
Mon, 23 Apr 2012 11:14:34 -0500
On Apr 22, 2012, at 6:36 AM, Peter Bex wrote:
> Hi all,
> This was reported on IRC:
> |10:27| ( rwinkler) ((lambda (x y #!optional z #!rest r #!key i (j 1))
> |10:27| ( rwinkler) (list x y z i: i j: j))
> |10:27| ( rwinkler) 3 4 5 i: 6 i: 7) => (3 4 5 i: #f j: 1)
> |10:27| ( rwinkler) (in my csi in emacs)
> |10:28| ( rwinkler) why does this call yield (3 4 5 i: #f j: 1) and not (3 4
> 5 i: 6 j: 1) as is documented?
> Attached is a fix. The keyword args should be taken either from the
> dotted tail varargs (as before), or the rest args in the let-optional
> if there are any. The patch should speak for itself.
> I tried to add a few more testcases, but I'm sure they're not exhaustive.
> "The process of preparing programs for a digital computer
> is especially attractive, not only because it can be economically
> and scientifically rewarding, but also because it can be an aesthetic
> experience much like composing poetry or music."
> -- Donald Knuth
> Chicken-hackers mailing list