Sets the step for a range.
Syntax: <range> per <expression>
Category
range
Related
Examples
examples/corpus/per/per.fab (canonical · keyword)
Sets the step for a range.
# per — step size for range iteration
#
# itera ab <initium>‥<finis> per <gradus> <var> { … } -- half-open range step
#
# GRAMMAR:
# iterStmt :← 'itera' 'ab' expr '‥' expr 'per' expr binding block
#
# EXPECTED OUTPUT:
# 0, 2, 4, 6 (step by 2 over 0‥8).
incipit {
# i = 0, 2, 4, 6 (step by 2)
itera ab 0‥8 per 2 fixum i {
nota i
}
}Expected output:
0
2
4
6