do cry(); while (world.state != desirable)
with one event listener registered:
worldChange(world.state) { pause(crying); /* Must evaluate world.state unencumbered. * Amusing side-effect: giving care-giver a * brief flash of false hope. */ if(world.state == desirable) stop(crying); else cry(); }
Of course, the root cause problem here is that the baby is reduced to communicating in binary, and ineffectively at that, because there's only one bit worth of information that can be conveyed.