Subject: Re: Generating procedure arguments From: James Clark <jjc@xxxxxxxxxx> Date: Tue, 11 Aug 1998 12:15:52 +0700 |
This is what the apply primitive is for. Chris Maden wrote: > > In the interest of modularity, I'm trying to pass function parameters > through one function to another. Here's a simple solution: > > (element a > (some-function other-fxn-args: '(arg1: value1))) > > (define (some-function #!key other-fxn-args) > (do-something (other-fxn (car other-fxn-args) > (cadr other-fxn-args)))) > > (define (other-fxn #!key arg1) > (debug arg1)) > > This works correctly; (other-fxn) gets value1 as the value of arg1. > But I'd like to be able to pass an arbitrary number of arguments, > maybe keywords, maybe not, without the intermediary function worrying > about the nature and order. But I can't do any loop function, since > those need to return a single object, and that won't work. > > In short: is there any way to burst or split a list into its > components? This would be a function that returns multiple objects, > which I'm not sure is possible, but it would be really nice if there > were a way to do this. > > Thanks in advance, > Chris > -- > <!NOTATION SGML.Geek PUBLIC "-//Anonymous//NOTATION SGML Geek//EN"> > <!ENTITY crism PUBLIC "-//O'Reilly//NONSGML Christopher R. Maden//EN" > "<URL>http://www.oreilly.com/people/staff/crism/ <TEL>+1.617.499.7487 > <USMAIL>90 Sherman Street, Cambridge, MA 02140 USA" NDATA SGML.Geek> > > DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Generating procedure arguments, Chris Maden | Thread | character substitution., Pawson, David |
Generating procedure arguments, Chris Maden | Date | Re: not a character number in the d, David Carlisle |
Month |