blob: 6cf9ffc85f3a8fed3b343a3f63cee3a8af453503 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
'\" t
.\" Copyright (c) 2026 Bruce Hill
.\" All rights reserved.
.\"
.TH Int.onward 3 2026-01-19 "Tomo man-pages"
.SH NAME
Int.onward \- iterate from a number onward
.SH LIBRARY
Tomo Standard Library
.SH SYNOPSIS
.nf
.BI Int.onward\ :\ func(first:\ Int,\ step:\ Int\ =\ 1\ ->\ Text)
.fi
.SH DESCRIPTION
Return an iterator that counts infinitely from the starting integer (with an optional step size).
.SH ARGUMENTS
.TS
allbox;
lb lb lbx lb
l l l l.
Name Type Description Default
first Int The starting integer. -
step Int The increment step size. 1
.TE
.SH RETURN
An iterator function that counts onward from the starting integer.
.SH EXAMPLES
.EX
nums : &[Int] = &[]
for i in 5.onward()
nums.insert(i)
stop if i == 10
assert nums[] == [5, 6, 7, 8, 9, 10]
.EE
.SH SEE ALSO
.BR Tomo-Int (3)
|