Ah - on the first call it will return the first alternative where the randomly generated number is less than the maximum probability. On following calls, it will look up that first assignment, hence repeatability.