0

Basically, I have this piece of code:

    final List<Article> articles = new ArrayList<>();

    feeds.forEach(feed -> articles.addAll(feed.getArticles()));

    return articles;

Is there a way to make it any more Java 8-functional? To eliminate the additional variable and make this entire block into a single return statement?

Cube.
  • 483
  • 6
  • 15

0 Answers0