aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/data/text.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/library/lux/data/text.lux')
-rw-r--r--stdlib/source/library/lux/data/text.lux18
1 files changed, 9 insertions, 9 deletions
diff --git a/stdlib/source/library/lux/data/text.lux b/stdlib/source/library/lux/data/text.lux
index 5ac09a8e5..e52ca50c0 100644
--- a/stdlib/source/library/lux/data/text.lux
+++ b/stdlib/source/library/lux/data/text.lux
@@ -68,9 +68,9 @@
(def: .public (last_index part text)
(-> Text Text (Maybe Nat))
- (loop [offset 0
- output (is (Maybe Nat)
- {.#None})]
+ (loop (again [offset 0
+ output (is (Maybe Nat)
+ {.#None})])
(let [output' ("lux text index" offset part text)]
(case output'
{.#None}
@@ -164,8 +164,8 @@
(def: .public (all_split_by token sample)
(-> Text Text (List Text))
- (loop [input sample
- output (is (List Text) (list))]
+ (loop (again [input sample
+ output (is (List Text) (list))])
(case (..split_by token input)
{.#Some [pre post]}
(|> output
@@ -212,8 +212,8 @@
(def: .public (replaced pattern replacement template)
(-> Text Text Text Text)
(with_expansions [... Inefficient default
- <default> (loop [left ""
- right template]
+ <default> (loop (again [left ""
+ right template])
(case (..split_by pattern right)
{.#Some [pre post]}
(again ($_ "lux text concat" left pre replacement) post)
@@ -301,8 +301,8 @@
(as Nat))
... Platform-independent default.
(let [length ("lux text size" input)]
- (loop [index 0
- hash 0]
+ (loop (again [index 0
+ hash 0])
(if (n.< length index)
(again (++ index)
(|> hash