Factor: produce distinct values in a fixed order