aboutsummaryrefslogtreecommitdiff
path: root/man/man3/tomo-Byte.to.3
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-10-11 15:50:19 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-10-11 15:50:19 -0400
commit436d2e02debe058e9968935e742e397c19de628a (patch)
treec51d08a586ead5c4f22d3f2d12695c4a7cf6cbca /man/man3/tomo-Byte.to.3
parent7e8604daeb9239e1669c5414dd6caa37af30c4ff (diff)
Improvements to set support and updating docs
Diffstat (limited to 'man/man3/tomo-Byte.to.3')
-rw-r--r--man/man3/tomo-Byte.to.318
1 files changed, 9 insertions, 9 deletions
diff --git a/man/man3/tomo-Byte.to.3 b/man/man3/tomo-Byte.to.3
index 9982f5da..15774ba7 100644
--- a/man/man3/tomo-Byte.to.3
+++ b/man/man3/tomo-Byte.to.3
@@ -2,7 +2,7 @@
.\" Copyright (c) 2025 Bruce Hill
.\" All rights reserved.
.\"
-.TH Byte.to 3 2025-04-30 "Tomo man-pages"
+.TH Byte.to 3 2025-10-11 "Tomo man-pages"
.SH NAME
Byte.to \- iterate over a range of bytes
.SH LIBRARY
@@ -31,13 +31,13 @@ An iterator function that returns each byte in the given range (inclusive).
.SH EXAMPLES
.EX
->> Byte(2).to(5)
-= func(->Byte?)
->> [x for x in Byte(2).to(5)]
-= [Byte(2), Byte(3), Byte(4), Byte(5)]
->> [x for x in Byte(5).to(2)]
-= [Byte(5), Byte(4), Byte(3), Byte(2)]
+iter := Byte(2).to(4)
+assert iter() == 2
+assert iter() == 3
+assert iter() == 4
+assert iter() == none
->> [x for x in Byte(2).to(5, step=2)]
-= [Byte(2), Byte(4)]
+assert [x for x in Byte(2).to(5)] == [Byte(2), Byte(3), Byte(4), Byte(5)]
+assert [x for x in Byte(5).to(2)] == [Byte(5), Byte(4), Byte(3), Byte(2)]
+assert [x for x in Byte(2).to(5, step=2)] == [Byte(2), Byte(4)]
.EE