This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: (OT) how to pass named parameters to the procedure?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]