Integer range
Description
Pure function returning an integer array from first to last (inclusive). Useful as input to for-each.
When to use
Use Integer range to generate a sequence of integers without needing a For loop.
The resulting array can be fed directly into For each to iterate over a numeric
range, or passed to Array length to count the elements. It is a pure node so it
evaluates lazily — wire it to any downstream node that accepts an integer[].
Pins
Input pins
| Pin | Type | Default | Notes |
|---|---|---|---|
| First | integer | 1 | The first value in the range (inclusive). |
| Last | integer | 5 | The last value in the range (inclusive). If last is less than first the result is an empty array. |
Output pins
| Pin | Type | Notes |
|---|---|---|
| Result | integer[] | An array containing every integer from first to last inclusive. |
Example
Iterate over pages 1 through 10 of a paginated API. Set First to 1 and Last to 10,
then wire the Result output into the Array input of For each. On each Loop body
iteration, the Element output carries the current page number, which can be wired
through Integer to string and Concatenate strings to build the page-specific URL for
an HTTP request.