Note
%
message to mycost
:
Example 4.8. Accessing a method
cost=.object~subclass("A cost") cost~define("%", 'expose p; say "Enter a price."; pull p; say p*1.07;') mycost=cost~new mycost~"%" /* Produces: Enter a price. */ /* If the user specifies a price of 100, */ /* produces: 107.00 */