#!/usr/bin/env murex

# Idiomatic way of iterating in murex

out "Iteration over a foreach loop:"

%[0..4] -> foreach i {
    out "  %[0..4] -> foreach i { $i -> ... }"
}


# While loop

out "Iteration over a while loop:"

i = 0
while { $i < 5 } {
    out "  while { $i < 5 } { ... }"
    i += 1
}


# Traditional for loop

out "Iteration over a for loop:"

for ( i=0; i<5; i++ ) {
    out "  for ( i=0; $i<5; i++ ) { ... }"
}