[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/geiser-racket 7a16f5a 012/191: Racket: using `_' for namin
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa/geiser-racket 7a16f5a 012/191: Racket: using `_' for naming unknown args in autodoc. |
Date: |
Sun, 1 Aug 2021 18:31:50 -0400 (EDT) |
branch: elpa/geiser-racket
commit 7a16f5a8454ba9a9b653318c75b5aae2c46640b7
Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
Commit: Jose Antonio Ortega Ruiz <jao@gnu.org>
Racket: using `_' for naming unknown args in autodoc.
---
geiser/autodoc.rkt | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/geiser/autodoc.rkt b/geiser/autodoc.rkt
index 5b85e96..a62bc24 100644
--- a/geiser/autodoc.rkt
+++ b/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))]))
- [nongnu] branch elpa/geiser-racket created (now 22e56ce), Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket ac0f055 002/191: Racket: PLT implementation renamed to Racket., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 6b02ac9 019/191: Truncating lines in documentation browser., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 0a35180 024/191: Racket: better stack traces using errortrace, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 45fdb13 003/191: Elisp: misc little bugs (revealed by the byte compiler) fixed., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 54d4b8d 017/191: Racket: indentation for typed binding forms., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 7f8b4b7 014/191: Better switch/import REPL commands., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 7a16f5a 012/191: Racket: using `_' for naming unknown args in autodoc.,
Philip Kaludercic <=
- [nongnu] elpa/geiser-racket 130c38e 028/191: Racket: support for gracket-text, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket cd122ff 021/191: Tweaks to scheme implementation selection, and docs for it., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 26ba1f2 011/191: Racket: improvements in module lookups., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket c03596d 013/191: Wee refactoring., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket c6c6bba 026/191: Support for evaluation warnings, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket c07a42d 034/191: Racket: using meta-commands instead of dynamic-require (#30347), Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket d8076a5 029/191: Couple nits, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket de36aed 027/191: Better REPL exit command, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 15cb8fb 006/191: Racket: providing error contexts, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 739aaec 010/191: Racket: improvements in non-loaded module location., Philip Kaludercic, 2021/08/01