LossGain Deux

Refine your solution to the "Your Loss Our Gain" program to include at least one function - and possibly more as appropriate.