This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Using APPLY with functions with #!key arguments
- From: Duncan Mak <duncanmak at gmail dot com>
- To: kawa mailing list <kawa at sourceware dot org>
- Date: Wed, 27 Dec 2017 20:28:49 -0500
- Subject: Using APPLY with functions with #!key arguments
- Authentication-results: sourceware.org; auth=none
I think this used to work in older Kawa releases, but how do I use
APPLY to invoke a function like this in Kawa 3.0?
#|kawa:1|# (define (foo x #!key y) (list x y))
#|kawa:2|# (foo 1 y: 2)
(1 2)
#|kawa:3|# (apply foo (list 1))
(1 #f)
#|kawa:4|# (apply foo (list 1 2))
gnu.mapping.WrongArguments
#|kawa:5|# (apply foo (list 1 y: 2))
gnu.mapping.WrongArguments
In Kawa 2.4, this worked:
duncan@furigana:~/Downloads/kawa-2.4/bin$ ./kawa
#|kawa:1|# (define (foo x #!key y) (list x y))
#|kawa:2|# (apply foo (list 1 y: 2))
(1 2)
#|kawa:3|# (apply foo (list 1 2))
(1 #f)
Happy holidays!
--
Duncan.