Change Reference to Value

refactorgram

class Product {
  applyDiscount(arg) {this._price.amount -= arg;}

image/svg+xml

class Product {
  applyDiscount(arg) {
    this._price = new Money(this._price.amount - arg, this._price.currency);
  }

inverse of Change Value to Reference