foreachlist

| Name | Type | Description | Optional |
|---|---|---|---|
input |
list<?0> |
list to be iterated. must be non-empty. |
no |
| Name | Type | Description | Optional |
|---|---|---|---|
output |
?0 |
an element of the list |
no |
final |
bool |
true if output is the last element of the list |
yes |
foreachlist reads its input port without removing the value it reads. The value it reads is a list, which must be non-empty. It is an error if an empty list is read. For every element of the input list except the last,, that element is output from the output port, and false is output on the final port. The last element of the list is then output from the output port, true is outupt on the final port, and the input list is removed from the input port. It is recommended that you read the Iteration section of the Dataflow in Coreograph document in addition to the information presented here.
See the Special Nodes example foreachlist:

The result of Run for this example is:

The Special Nodes examples collectlist, collectset, collectvector, and collectmap make use of foreachlist as well.