Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
In Program 7.4, we decided to reduce the fraction outside of the add: method. We could have done it inside add: as well; the decision was completely arbitrary. However, how would we go about identifying the fraction to be reduced to our reduce method? We know how to identify instance variables inside a method directly by name, but we don’t know how to directly identify the receiver of the message.
You can use the keyword self to refer to the object that is the receiver of the current method. If inside your add: method you wrote