Skip to content

Commit

Permalink
Update 2017-11-04-but-how-do-you-work-without-a-model.markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
amihaiemil authored Feb 26, 2024
1 parent ffdb6ac commit 41a36d4
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ so it makes sense to always have them updated, to respect the market. How do we
{% highlight java %}
List<Car> cars = ...;//a list of cars;
List<Car> cheaper = cars.filter(
car -> car.price().value().compareTo(BigDecimal.valueOf(10.000)) > 0
car -> car.price().value().compareTo(BigDecimal.valueOf(10.000)) > 0
);
{% endhighlight %}

You see, after the creation of the ``cheaper`` cars List, the price of a Car may change and become > 10.000. Yet it is still in the list. How do we fix this?
Expand Down

0 comments on commit 41a36d4

Please sign in to comment.