This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: (OT) how to pass named parameters to the procedure?
- From: Victor Anyakin <anyakin at bonustec dot com>
- To: kawa at sources dot redhat dot com
- Date: Tue, 13 Dec 2005 20:24:41 +0200
- Subject: Re: (OT) how to pass named parameters to the procedure?
- References: <20051213120649.GA7046@anyakin>
On Tue, Dec 13, 2005 at 02:06:49PM +0200, Victor Anyakin wrote:
> Greetings to all,
>
> the question is slightly offtopic, but, probably, somebody could
> explain, is it possible to pass named parameters to functions in
> scheme and in Kawa particulary.
>
> I mean, is it possible to perform such calls:
>
> (tn-char :code 32 :blink #t :underline #f)
>
> Whereas `tn-char' could be a function, or, optionally a data holder
> (record).
Well, I have figured out, that it can be achieved by using
`make-record-type' and then calling `make' to instantiate a new
record.
The next question is: is there any pattern, or `recipe' how to make
records with default values?
As the solution I see, this somewhat creepy, probably, there are
better ones?
--
Victor Anyakin () ascii ribbon campaign
/\ - against html mail