From b238f1df41eb4f3badd69abc9ae0b5dc857e58a6 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Tue, 5 Nov 2024 15:20:47 -0500 Subject: Fix up old-style reducers --- examples/wrap/wrap.tm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'examples') 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) -- cgit v1.2.3