I'd prefer a local method or even a while loop inside canonical since traits cannot have private methods.