Use argument names procedure.
This commit is contained in:
parent
c2c19c2d6a
commit
edb6f14a9d
2 changed files with 6 additions and 2 deletions
|
@ -84,8 +84,7 @@
|
||||||
|
|
||||||
;; String representation of procedure arguments.
|
;; String representation of procedure arguments.
|
||||||
(define (procedure->argstring proc)
|
(define (procedure->argstring proc)
|
||||||
(let* ((info (procedure-information proc))
|
(let* ((args (procedure-arg-names proc))
|
||||||
(args (cdr info))
|
|
||||||
(argss (sprintf "~A" args)))
|
(argss (sprintf "~A" args)))
|
||||||
(substring
|
(substring
|
||||||
(substring argss 0 (- (string-length argss) 1))
|
(substring argss 0 (- (string-length argss) 1))
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
procedure-arity>?
|
procedure-arity>?
|
||||||
|
|
||||||
procedure-num-args
|
procedure-num-args
|
||||||
|
procedure-arg-names
|
||||||
)
|
)
|
||||||
|
|
||||||
(import scheme
|
(import scheme
|
||||||
|
@ -79,4 +80,8 @@
|
||||||
(let-values (((args rest?) (procedure-arity-info proc)))
|
(let-values (((args rest?) (procedure-arity-info proc)))
|
||||||
args))
|
args))
|
||||||
|
|
||||||
|
;; Returns the formal argument names for given procedure
|
||||||
|
(define (procedure-arg-names proc)
|
||||||
|
(cdr (procedure-information proc)))
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue