Remember earlier this week, when Java's stream API didn't have that intermediate operation you needed? It will soon get it. Which operation am I talking about? All of them! Thanks to Gatherers, we can easily and seamlessly implement our own: youtube.com/watch?v=epgJm2…
After going over the theory ☝️🏾, watch me implement a bunch of operations with the Gatherer API: * map * filter * flatMapIf * takeWhileIncluding * limit * increasing * runningAverage * fixedGroups * slidingWindow * sorted * increasingSequences youtube.com/watch?v=pNQ5OX…
I just uploaded the code with a workaround for those without a JDK build that includes the new API: github.com/nipafx/demo-ja… So you can already build all your gatherers and lie in waiting for JEP 461 to be merged, shipped, and eventually finalized.
@nipafx The first time I saw the Devoxx presentation I was like WTF, but now I understand it and it's AMAZING 🤩
@nipafx "Welcome to live debugging" 😄 Really cool to see the new API in action, it opens up a lot of possibilities. My favorite is definitely takeWhileIncluding – farewell, stateful predicates! 👋