diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-11-05 15:20:47 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-11-05 15:20:47 -0500 |
| commit | b238f1df41eb4f3badd69abc9ae0b5dc857e58a6 (patch) | |
| tree | a00f26f0e4c5d78602509ac984dc15b9e63b60df /examples/wrap | |
| parent | b8d7eabc023bf9db0150049d8e909086f6ad91bc (diff) | |
Fix up old-style reducers
Diffstat (limited to 'examples/wrap')
| -rw-r--r-- | examples/wrap/wrap.tm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/wrap/wrap.tm b/examples/wrap/wrap.tm index ced8aab1..1c43470a 100644 --- a/examples/wrap/wrap.tm +++ b/examples/wrap/wrap.tm @@ -49,12 +49,12 @@ func wrap(text:Text, width:Int, min_split=3, hyphen="-" -> Text): split = split _max_ min_split split = split _min_ (letters.length - min_split) if line != "": line ++= " " - line ++= ((++) letters:to(split)) ++ hyphen + line ++= ((++: letters:to(split)) or "") ++ hyphen letters = letters:from(split + 1) else if line == "": # Force split word without hyphenation: if line != "": line ++= " " - line ++= ((++) letters:to(line_space)) + line ++= (++: letters:to(line_space)) or "" letters = letters:from(line_space + 1) else: pass # Move to next line @@ -64,7 +64,7 @@ func wrap(text:Text, width:Int, min_split=3, hyphen="-" -> Text): if letters.length > 0: if line != "": line ++= " " - line ++= (++) letters + line ++= (++: letters) or "" if line != "": lines:insert(line) |
