Sven Bendel
Nov 5 · 1 min read

Hi Steliannirlu, that indeed is a viable alternative, however you have to add a type parameter when invoking the identity function to make it work:

.flatMapIterable(Function.identity<YourExpectedType>())

    Sven Bendel

    Written by

    Founder and Senior Android Engineer. Crowdfunding addict. Trying hard to do the right thing and failing more often than not.