A comparison between the reinforcing and discriminative functions of a stimulus