When tryptophan is present, it functions as a corepressor by binding to the repressor. This complex binds to the operator, leading to a partial repression of the operon by attenuation.