aboutsummaryrefslogtreecommitdiff
path: root/test/iterators.tm
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-08-31 23:33:22 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-08-31 23:33:22 -0400
commit5fc7577b5a3bc2c445522dfd5b287e1c6eddc3e9 (patch)
tree34d44c9330dc3ec71fc850b95b3412a1ce292cb8 /test/iterators.tm
parenta571ccffd795a595e990a3405dcf977aafc33c6c (diff)
Switch to using optional return values for list indexing.
Diffstat (limited to 'test/iterators.tm')
-rw-r--r--test/iterators.tm3
1 files changed, 1 insertions, 2 deletions
diff --git a/test/iterators.tm b/test/iterators.tm
index 08382cff..c48e572b 100644
--- a/test/iterators.tm
+++ b/test/iterators.tm
@@ -4,9 +4,8 @@ struct Pair(x:Text, y:Text)
func pairwise(strs:[Text] -> func(->Pair?))
i := 1
return func()
- if i + 1 > strs.length return none
i += 1
- return Pair(strs[i-1], strs[i])?
+ return Pair(strs[i-1] or return none, strs[i] or return none)?
func range(first:Int, last:Int -> func(->Int?))
i := first