diff --git a/lib/chibi/doc.scm b/lib/chibi/doc.scm index 6d122ed4..93082730 100644 --- a/lib/chibi/doc.scm +++ b/lib/chibi/doc.scm @@ -755,11 +755,15 @@ div#footer {padding-bottom: 50px} cur)) (define (get-ids sxml) (match sxml - (((or 'procedure 'macro) str) - (list - (string->symbol - (string-trim (car (string-split str)) - (lambda (ch) (or (eq? ch #\() (eq? ch #\)))))))) + (((or 'procedure 'macro) x) + (cond + ((string? x) + (list + (string->symbol + (string-trim (car (string-split x)) + (lambda (ch) (or (eq? ch #\() (eq? ch #\)))))))) + (else + '()))) ((x ...) (append-map get-ids x)) (else '()))) (skip-horizontal-whitespace in) diff --git a/lib/chibi/loop/loop.scm b/lib/chibi/loop/loop.scm index dc1d8af0..bdafc750 100644 --- a/lib/chibi/loop/loop.scm +++ b/lib/chibi/loop/loop.scm @@ -49,7 +49,7 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;> \macro{\scheme{(loop [name] (vars ...) [=> result] body ...)}} +;;> \macro{(loop [name] (vars ...) [=> result] body ...)} (define-syntax loop (syntax-rules () @@ -154,7 +154,7 @@ ;; \item{\var{final-vars} - final variables, bound only in the => result} ;; ] -;;> \subsubsubsection{\scheme{(for var [pair] (in-list ls [cdr]))}} +;;> \macro{(for var [pair] (in-list ls [cdr]))} ;;> Basic list iterator. @@ -225,11 +225,11 @@ (%in-idx < (lambda (x i) (- i 1)) (lambda (x) (- (length x) 1)) (lambda (x) 0) ref tmp seq next . rest)))) )))) +(define-in-indexed in-vector in-vector-reverse vector-length vector-ref) + ;;> \macro{(for var [index] (in-vector vec))} ;;> \macro{(for var [index] (in-vector-reverse vec))} -(define-in-indexed in-vector in-vector-reverse vector-length vector-ref) - ;;> \macro{(for ch [cursor] (in-string str))} (define-syntax in-string