On page 21:
For each price from the prices list that passes through the filter(), the mapToInt() method invokes the provided lambda expression to transform the given price to a discounted price.
Reference to mapToInt()
is incorrect, as on the previous page (Page 20) to example code contains mapToDouble()
which makes the code working.