Use number of procedure arguments function from util-proc in command-line.
This commit is contained in:
parent
147afa3ab4
commit
c2c19c2d6a
4 changed files with 16 additions and 9 deletions
|
@ -54,7 +54,8 @@
|
|||
(import scheme
|
||||
(chicken base)
|
||||
testing
|
||||
util-tag)
|
||||
util-tag
|
||||
util-proc)
|
||||
|
||||
;; Tag used for identifying list dictionaries from this module
|
||||
(define TAG-LDICT (make-tag LDICT))
|
||||
|
@ -162,9 +163,8 @@
|
|||
;; accepts more than one argument. If it accepts a third argument,
|
||||
;; index gets passed as well.
|
||||
(define (ldict-map proc ld)
|
||||
(let* ((lpi (length (procedure-information proc)))
|
||||
(both? (> lpi 2))
|
||||
(index? (> lpi 3)))
|
||||
(let ((both? ((procedure-arity>=? 2) proc))
|
||||
(index? ((procedure-arity>=? 3) proc)))
|
||||
(let loop ((pairs (ldict-pairs ld))
|
||||
(res '())
|
||||
(i 0))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue