Plange


evaluate the last expression repeatedly while iterating over the elements of the specified Collection

syntax

"for" "(" (([(TYPE_DEREFERENCE | IMPLICIT_TYPE_DEREFERENCE)] IDENTIFIER) | EXPRESSION) ("in"|"∈") (EXPRESSION) ")" EXPRESSION

Example

<> fibArray = [ 0, 1, 1, 2, 3, 5, 8, 13 ];
for (element ∈ fibArray) {
    print(element);
}

Example

for ((key, value) ∈ myMap) {
    //do something
}

This website does not use cookies or javascript, excluding the Google search bar and Google analytics.
copyright © Brent Lewis 2013-2018