| I knew you can define a parameterized Integer type and iterate that (like a range):
$ bx puppet apply -e 'Integer[0,1].each |$i| { notice($i) }' |
Notice: Scope(Class[main]): 0 |
Notice: Scope(Class[main]): 1
|
But I didn't know you could iterate the integer directly:
$ bx puppet apply -e '2.each |$i| { notice($i) }' |
Notice: Scope(Class[main]): 0 |
Notice: Scope(Class[main]): 1
|
Note there seems to be an off-by-one issue though. The comment says it yields the number, but it only yields up to, but not including the number, which is surprising given that Integer[0, 1] is inclusive by default. |