renaming counted line-numbers

This commit is contained in:
Alex Shinn 2017-08-21 22:08:29 +09:00
parent 8470534c39
commit ab57bb7681
2 changed files with 3 additions and 4 deletions

View file

@ -12,7 +12,6 @@
(define (output* str) (define (output* str)
(fn (row col string-width) (fn (row col string-width)
(list-queue-add-back! queue str) (list-queue-add-back! queue str)
;;(set! lines (append lines (list str)))
(call-with-current-continuation (call-with-current-continuation
(lambda (cc) (lambda (cc)
(set! resume cc) (set! resume cc)
@ -286,7 +285,7 @@
(else (else
(lp (cdr ls) infinite? width (cons (car ls) res))))))) (lp (cdr ls) infinite? width (cons (car ls) res)))))))
;; break lines only, don't fmt-join short lines or justify ;; break lines only, don't join short lines or justify
(define (wrapped/char . ls) (define (wrapped/char . ls)
(fn (output width string-width) (fn (output width string-width)
(define (kons-in-line str) (define (kons-in-line str)
@ -445,6 +444,6 @@
(each line (each line
(fn () (lp)))))))))) (fn () (lp))))))))))
(define (counted . o) (define (line-numbers . o)
(let ((start (if (pair? o) (car o) 1))) (let ((start (if (pair? o) (car o) 1)))
(joined/range displayed start #f "\n"))) (joined/range displayed start #f "\n")))

View file

@ -6,5 +6,5 @@
(export (export
call-with-output-generator call-with-output-generators call-with-output-generator call-with-output-generators
string->line-generator string->line-generator
columnar tabular wrapped wrapped/char justified counted from-file) columnar tabular wrapped wrapped/char justified line-numbers from-file)
(include "column.scm")) (include "column.scm"))