From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9143 invoked by alias); 28 Dec 2017 02:49:17 -0000 Mailing-List: contact kawa-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: kawa-owner@sourceware.org Received: (qmail 9133 invoked by uid 89); 28 Dec 2017 02:49:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,KAM_SHORT,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=H*F:U*per, H*M:1352 X-HELO: aibo.runbox.com Received: from aibo.runbox.com (HELO aibo.runbox.com) (91.220.196.211) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 28 Dec 2017 02:49:15 +0000 Received: from [10.9.9.211] (helo=mailfront11.runbox.com) by mailtransmit02.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1eUOFs-0007R1-JY; Thu, 28 Dec 2017 03:49:12 +0100 Received: from [76.9.78.86] (helo=localhost.localdomain) by mailfront11.runbox.com with esmtpsa (uid:757155 ) (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.82) id 1eUOFh-0004pE-Tv; Thu, 28 Dec 2017 03:49:02 +0100 Subject: Re: Using APPLY with functions with #!key arguments To: Duncan Mak , kawa mailing list References: From: Per Bothner Message-ID: <4ca9626b-1352-f192-ec10-5f77f6aa1017@bothner.com> Date: Thu, 28 Dec 2017 02:49:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017-q4/txt/msg00047.txt.bz2 On 12/27/2017 05:28 PM, Duncan Mak wrote: > 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)) You can do this: (apply foo (arglist 1 y: 2)) which is the same as: (foo @:(arglist 1 y: 2)) This chapter in the manual should be helpful: https://www.gnu.org/software/kawa/Application-and-Arguments-Lists.html -- --Per Bothner per@bothner.com http://per.bothner.com/