Many simple repetitions can effectively be done with a "now…" instruction: it is quicker to say
Repeat comes in handy when we have something a bit more complicated to do with each item:
Notice we did not say "repeat with dancer running through alert people who are not the player…". This is because Inform would draw up a list of alert people at the beginning of the repeat, and not take into account which people became occupied partway through the repetition. If we want to make sure that each person dances only with one other person, we have to continue checking alertness each time we run through the repetition.
After all the partners are assigned, we can set up for the next turn by making everyone alert again, and for this we do not need "repeat":
Test me with "z / ask linus about blanket / z / z".
A rather utilitarian space at the moment, since this is a class and not a party.
You can see Timmy, Tommy, Joey, George, Mary, Martha, Yvette, McQueen, Linus and Patricia here.
Timmy two-steps with Yvette. Tommy two-steps with George. Joey two-steps with McQueen. Mary two-steps with Linus. Martha two-steps with Patricia.
> ask linus about blanket
You successfully distract Linus.
Timmy two-steps with Martha. Tommy two-steps with George. Joey two-steps with Mary. Yvette two-steps with Patricia.
McQueen is forced to be a wallflower. Poor McQueen.
Timmy waltzes with Linus. Tommy waltzes with Patricia. Joey waltzes badly with Martha. George waltzes with McQueen. Mary waltzes with Yvette.
Timmy two-steps with George. Tommy two-steps badly with Linus. Joey two-steps seductively with Patricia. Mary two-steps with McQueen. Martha two-steps with Yvette.