[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: getting the argument list of a procedure
From: |
anders . vinjar |
Subject: |
Re: getting the argument list of a procedure |
Date: |
Thu, 05 Mar 2015 20:42:31 +0100 |
User-agent: |
Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.4 (gnu/linux) |
>>>>> "D" == David Nalesnik writes:
D> What you are suggesting seems to be analogous to what is already
D> done for the functions on the Scheme functions documentation page
D> I referenced earlier.
Ah, but you've got all you need there already it seems.
'procedure-source will return the body of any defined function, then
just grab the cadr of this to get the lambda-list:
(define (get-proc-args proc)
(cons (procedure-name proc) (cadr (procedure-source proc))))
(begin
(newline)
(display (get-proc-args get-chord-shape))
(newline)
(display (procedure-source get-proc-args)))
will return :
(get-chord-shape shape-code tuning base-chord-shapes)
(lambda (proc) (cons (procedure-name proc) (cadr (procedure-source proc))))
- getting the argument list of a procedure, David Nalesnik, 2015/03/04
- Re: getting the argument list of a procedure, Mattes, 2015/03/04
- Re: getting the argument list of a procedure, Orm Finnendahl, 2015/03/04
- Re: getting the argument list of a procedure, David Nalesnik, 2015/03/04
- Re: getting the argument list of a procedure, anders . vinjar, 2015/03/05
- Re: getting the argument list of a procedure, Paul Morris, 2015/03/05
- Re: getting the argument list of a procedure, David Nalesnik, 2015/03/05
- Re: getting the argument list of a procedure,
anders . vinjar <=
- Re: getting the argument list of a procedure, David Nalesnik, 2015/03/05
- Re: getting the argument list of a procedure, David Nalesnik, 2015/03/06
- Re: getting the argument list of a procedure, anders . vinjar, 2015/03/09