Inventory operator()(const Inventory& inv, float discount) { return Inventory(inv.getItem(), inv.getQuantity(), inv.getValue() * (1 - discount)); }
void operator()(const Inventory& inv) { quantity += inv.getQuantity(); value += inv.getQuantity() * inv.getValue(); }