aboutsummaryrefslogtreecommitdiff
path: root/module/text/flow.scm
diff options
context:
space:
mode:
Diffstat (limited to 'module/text/flow.scm')
-rw-r--r--module/text/flow.scm13
1 files changed, 7 insertions, 6 deletions
diff --git a/module/text/flow.scm b/module/text/flow.scm
index f7e08e1b..3b958480 100644
--- a/module/text/flow.scm
+++ b/module/text/flow.scm
@@ -7,6 +7,7 @@
:use-module (hnh util)
:use-module (text util)
:use-module (srfi srfi-1)
+ :use-module (srfi srfi-71)
)
@@ -23,12 +24,12 @@
;; str -> (str)
(define* (justify-line line #:key (width 70))
(let recur ((lst (words line)))
- (let* ((head tail (span
- (let ((w 0))
- (lambda (word) ; Take words until we are above the limit.
- (< (set/r! w = (+ 1 (true-string-length word)))
- width)))
- lst)))
+ (let ((head tail (span
+ (let ((w 0))
+ (lambda (word) ; Take words until we are above the limit.
+ (< (set/r! w = (+ 1 (true-string-length word)))
+ width)))
+ lst)))
(cond ((null? tail) (list (unwords head))) ; Don't justify last line.
((null? head)
;; an empty head implies that we found a word longer