Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialAndrey Serebryanskiy
5,756 PointsWhen using andThen function does not returns String for some reason
Hi!
In the second FixMe I wrote this line:
homeValueIndex -> usdToArgentinePesoConverter.andThen(argentineCurrencyFormatter));
However, for some reason it returns ?extends<V> istead of String. Here is a screenshot of what exactly IntelliJ writes if I hover on the error:
I made no changes to other code in the challenge.
Can you please explain me, what am I doing wrong?
Thank you in advance.
1 Answer
Carlos Ramirez
5,084 PointsHello Andrey,
First drop the lambda, see the variable "homeValueIndex " is not being used so, it is better to just pass the function reference that you already have.
Check this:
usdToArgentinePesoConverter.andThen(argentineCurrencyFormatter)
Regards
Andrey Serebryanskiy
5,756 PointsAndrey Serebryanskiy
5,756 PointsThank you very much, it helped and I understood my mistake)