aboutsummaryrefslogtreecommitdiff
path: root/test/iterators.tm
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-11-02 20:22:19 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-11-02 20:22:19 -0400
commit0b7a0dd043a4c7ccfc924d618508d1edc0115e2f (patch)
tree6e1942840ab7e1e10bed111d8d5a012eacdf8b9b /test/iterators.tm
parent985011aed89706e9a4b06e6c6f3239d53ac8e6e8 (diff)
Change reducers to use (OP: ...) syntax and return an optional value
Diffstat (limited to 'test/iterators.tm')
-rw-r--r--test/iterators.tm4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/iterators.tm b/test/iterators.tm
index fca91b2d..d6bcfa13 100644
--- a/test/iterators.tm
+++ b/test/iterators.tm
@@ -19,7 +19,7 @@ func range(first:Int, last:Int -> func(->Int?)):
func main():
values := ["A", "B", "C", "D"]
- >> ((++) "($(foo.x)$(foo.y))" for foo in pairwise(values))
+ >> (++: "($(foo.x)$(foo.y))" for foo in pairwise(values))!
= "(AB)(BC)(CD)"
>> ["$(foo.x)$(foo.y)" for foo in pairwise(values)]
= ["AB", "BC", "CD"]
@@ -34,5 +34,5 @@ func main():
>> [i for i in range(5, 10)]
= [5, 6, 7, 8, 9, 10]
- >> (+) range(5, 10)
+ >> (+: range(5, 10))!
= 45