ForLoop
enumerates each element of a list
from
a minimum
value – starting point –
to
a maximum
value – ending point –
by
a default step of 1, and stops once the maximum value is exceeded.
Forloop has two default inputs and one optional input :
"from" and "to" : a starting and and ending vlaue
"by" : the value of the enumeration step.
Constraints
Forloop can only handle and return
numbers :it cannot enumerate an existing list
- see ListLoop).
The value of "from"
must always be inferior
to the value of "to".
The default value of "by" is 1. It can be replaced by another
positive value
. If this value is negative, forloop doesn't stop, because "to" would never be reached.
Example : a List with a 7 step
ForLoop
stops the iteration when the value defined by "to" is exceeded. Here, the first value returned by finally is the first value which exceeds the maximum value.