2016-10-07 21:42 GMT+02:00 Michael Nascimento <mist...@gmail.com>:
> Doesn't work, as Stuart has noted (s'marks, as far as I know your
> explanation is 100% correct). Nested generics == pain :-(

Hi Michael,

sorry for being obtrusive. What exactly doesn't work?

Stuart's example

Optional<Integer> oi = Optional.empty();
Function<Number, Optional<StringBuilder>> fm = n -> Optional.empty();
Optional<CharSequence> ocs = oi.flatMap(fm);
System.out.println(ocs.orElse("empty"));

work's for me (on 1.8.0_51). Sorry, I'm just trying to understand.

Kind regards,
Stefan


>
> Regards,
> Michael
>

Reply via email to