Home Manual Type Index Symbol Index Topics Index
iterates over all items of the association list
the association list to iterate over
the statement sequence to execute for each item
used to return results to the caller
For each item the statement sequence supplied as body is called with one or two arguments (depending on body's parameter count).
If called with two arguments the first argument is the key and the second argument the corresponding value.
If called with one argument then only the value is supplied.
This is a sequential loop.
!ages("Tom") 5 !ages("Sam") 3 !ages("Sarah") 11
for_each ages: (name age) writeln! name ": " age next
Sarah: 11 Sam: 3 Tom: 5