Re: Generating procedure arguments

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
> --
> <!ENTITY crism PUBLIC "-//O'Reilly//NONSGML Christopher R. Maden//EN"
> "<URL> <TEL>+1.617.499.7487
> <USMAIL>90 Sherman Street, Cambridge, MA 02140 USA" NDATA SGML.Geek>
>  DSSSList info and archive:

 DSSSList info and archive:

Current Thread
  • Generating procedure arguments
    • Chris Maden - from mail1.ability.netby (8.8.5/8.6.12) with ESMTP id QAA03378Mon, 10 Aug 1998 16:48:43 -0400 (EDT)
      • James Clark - from mail1.ability.netby (8.8.5/8.6.12) with ESMTP id CAA15721Tue, 11 Aug 1998 02:09:58 -0400 (EDT) <=