|
From: | David Nalesnik |
Subject: | Re: getting the argument list of a procedure |
Date: | Wed, 4 Mar 2015 18:37:12 -0600 |
Dear David,
Am Mittwoch, den 04. März 2015 um 15:35:46 Uhr (-0600) schrieb David Nalesnik:
>
> I would like to be able to return the argument list of a Scheme function,
> say as a list of symbols.
I'm not sure I understand what exactly you're looking for. In scheme,
you can assign a name to all arguments of a function and refer to it
in the function body if you use dot notation. All arguments are
accessible within the body as a list referred to by the symbol after
the dot:
(define (return-args . args)
args)
(return-args 1 2 3 'blah 'foo "blub")
-> (1 2 3 blah foo "blub")
Does that answer your question?
==> (grob text)
However, this feels a little hacky to me, and I'm hoping that there's some better technique available to get at the names assigned to the arguments.
--David
[Prev in Thread] | Current Thread | [Next in Thread] |