# Functional Programming in Java, Second Edition: mapToInt() referenced instead of  mapToDouble() (page 21)

**URL:** <https://forum.devtalk.com/t/functional-programming-in-java-second-edition-maptoint-referenced-instead-of-maptodouble-page-21/71562>\
**Category:** PragProg Customers\
**Tags:** book-functional-programming-in-java-second-edition, errata\
**Created:** [31 August 2022 21:03 UTC](https://forum.devtalk.com/t/functional-programming-in-java-second-edition-maptoint-referenced-instead-of-maptodouble-page-21/71562 "2022-08-31T21:03:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jozshor00](https://forum.devtalk.com/letter_avatar_proxy/v4/letter/j/a183cd/32.png) [@jozshor00](https://forum.devtalk.com/u/jozshor00)\
**Post date:** [31 August 2022 21:03 UTC](https://forum.devtalk.com/t/functional-programming-in-java-second-edition-maptoint-referenced-instead-of-maptodouble-page-21/71562/1 "2022-08-31T21:03:06Z")

</div>

@venkats

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.

---

<div class="post-metadata">

**Author:** ![venkats](https://forum.devtalk.com/user_avatar/forum.devtalk.com/venkats/32/508_2.png) [@venkats](https://forum.devtalk.com/u/venkats)\
**Post date:** [31 May 2023 20:09 UTC](https://forum.devtalk.com/t/functional-programming-in-java-second-edition-maptoint-referenced-instead-of-maptodouble-page-21/71562/2 "2023-05-31T20:09:02Z")

</div>

Fixed. Thank you for the catch.
