refactoring-golf icon indicating copy to clipboard operation
refactoring-golf copied to clipboard

Solution to hole 6

Open nickebbitt opened this issue 6 years ago • 1 comments

Hi there,

I ran a refactoring golf session at my company today, thanks very much for providing the code.

None of managed to solve hole 6, are you able to share the steps used to get a score of 7? We were hoping there'd be a nice refactoring in IntelliJ to switch the loop to a stream but that doesn't exist.

Thanks

Nick

nickebbitt avatar Apr 05 '18 15:04 nickebbitt

I know this is old... but it looks like IntelliJ removed the intention to replace a for loop with the streams API. Doing a bit of googling, it was called foreach loop can be collapsed with the Stream API, and there's a screenshot attached of it to this youtrack ticket (from intellij 2016).

One might need to use an old version of intellij to get a 7 :)

augusto avatar Aug 18 '21 21:08 augusto