Loop Primitives
There are a few primitives designed to perform typical loop functions that may be useful in place of one of the loop statements. For example, the following statement is functionally identical to the code above:
The sigma primitive performs a summation equivalent to the mathematical expression

See sigma.
That is, the expression
is equivalent to
Another important loop primitive is makelist. While sigma returns the sum of distinct values created inside a loop, makelist returns a list containing each value.
See makelist.
For example, the expression:
returns the list
More specifically, the expression
is equivalent to
The primitive each is similar to makelist except each allows you to provide a list of specific input values for x rather than supply start and end values.
See each.
That is, the expression
is the same as