aboutsummaryrefslogtreecommitdiff
path: root/man/man3/tomo-Int.to.3
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-09-21 23:23:59 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-09-21 23:23:59 -0400
commit5824a2ef19879c59866667aced6b3f90e5925648 (patch)
treea18ddeadb0c164c7a544b571c3968f86afb759ba /man/man3/tomo-Int.to.3
parentbf067544e98f4085c26161953e301aaa00a904df (diff)
Update docs with proper assertions
Diffstat (limited to 'man/man3/tomo-Int.to.3')
-rw-r--r--man/man3/tomo-Int.to.319
1 files changed, 10 insertions, 9 deletions
diff --git a/man/man3/tomo-Int.to.3 b/man/man3/tomo-Int.to.3
index 2af4f5fd..ea8112bc 100644
--- a/man/man3/tomo-Int.to.3
+++ b/man/man3/tomo-Int.to.3
@@ -2,7 +2,7 @@
.\" Copyright (c) 2025 Bruce Hill
.\" All rights reserved.
.\"
-.TH Int.to 3 2025-04-30 "Tomo man-pages"
+.TH Int.to 3 2025-09-21 "Tomo man-pages"
.SH NAME
Int.to \- iterate a range of integers
.SH LIBRARY
@@ -31,13 +31,14 @@ An iterator function that returns each integer in the given range (inclusive).
.SH EXAMPLES
.EX
->> (2).to(5)
-= func(->Int?)
->> [x for x in (2).to(5)]
-= [2, 3, 4, 5]
->> [x for x in (5).to(2)]
-= [5, 4, 3, 2]
+iter := (2).to(5)
+assert iter() == 2
+assert iter() == 3
+assert iter() == 4
+assert iter() == 5
+assert iter() == none
->> [x for x in (2).to(5, step=2)]
-= [2, 4]
+assert [x for x in (2).to(5)] == [2, 3, 4, 5]
+assert [x for x in (5).to(2)] == [5, 4, 3, 2]
+assert [x for x in (2).to(5, step=2)] == [2, 4]
.EE