Document the progress module.
This commit is contained in:
parent
019136319f
commit
f870430cf1
2 changed files with 41 additions and 3 deletions
|
@ -50,10 +50,13 @@
|
|||
(display (sprintf "\r\x1b[K~A" cp)))))
|
||||
|
||||
;; Adds something to current progress and refreshes the display.
|
||||
(define (progress-advance str)
|
||||
(define (progress-advance . args)
|
||||
(when (*current-progress*)
|
||||
(*current-progress* (string-append (*current-progress*) (sprintf "~A" str)))
|
||||
(print-current-progress)))
|
||||
(let ((str (if (null? args)
|
||||
"."
|
||||
(car args))))
|
||||
(*current-progress* (string-append (*current-progress*) (sprintf "~A" str)))
|
||||
(print-current-progress))))
|
||||
|
||||
;; Runs given procedure within progress environment
|
||||
(define (run-with-progress echo? pre-msg post-msg thunk)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue