summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-06-17 02:34:14 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-06-17 02:34:14 +0200
commita4ae1d6901d397ad740141dddbd9144c04681586 (patch)
treebde9abb4a03a5af1a5033fdc931c1d3b8875ccff
parent7166e8e55900d1c3d7c45692c6121fb8a0920e16 (diff)
downloadgeiser-chez-a4ae1d6901d397ad740141dddbd9144c04681586.tar.gz
geiser-chez-a4ae1d6901d397ad740141dddbd9144c04681586.tar.bz2
Racket: using `_' for naming unknown args in autodoc.
-rw-r--r--scheme/racket/geiser/autodoc.rkt13
1 files changed, 4 insertions, 9 deletions
diff --git a/scheme/racket/geiser/autodoc.rkt b/scheme/racket/geiser/autodoc.rkt
index 5b85e96..a62bc24 100644
--- a/scheme/racket/geiser/autodoc.rkt
+++ b/scheme/racket/geiser/autodoc.rkt
@@ -160,17 +160,12 @@
[else 'variable])))
(define (arity->signatures arity)
- (define (args fst count)
- (let* ([letts (list->vector '(#\x #\y #\z #\u #\v #\w #\r #\s))]
- [len (vector-length letts)]
- [lett (lambda (n) (vector-ref letts (modulo n len)))])
- (map (lambda (n) (string->symbol (format "~a" (lett n))))
- (build-list count (lambda (n) (+ n fst))))))
+ (define (args count) (build-list count (const '_)))
(define (arity->signature arity)
(cond [(number? arity)
- (signature (args 0 arity) '() '() #f)]
+ (signature (args arity) '() '() #f)]
[(arity-at-least? arity)
- (signature (args 0 (arity-at-least-value arity)) '() '() 'rest)]))
+ (signature (args (arity-at-least-value arity)) '() '() 'rest)]))
(define (conseq? lst)
(cond [(< (length lst) 2) (number? (car lst))]
[(and (number? (car lst))
@@ -181,7 +176,7 @@
(cond [(and (list? arity) (conseq? arity))
(let ((mi (apply min arity))
(ma (apply max arity)))
- (list (signature (args 0 mi) (args mi (- ma mi)) '() #f)))]
+ (list (signature (args mi) (args (- ma mi)) '() #f)))]
[(list? arity) (map arity->signature arity)]
[else (list (arity->signature arity))]))