cheapest method

Implementation

CostEstimate cheapest(CostEstimate a, CostEstimate b) =>
    a.totalCost <= b.totalCost ? a : b;