|
|
|
|
|
by haroldl
2465 days ago
|
|
Functional Programming is not just for Haskell; modern Java has lots of pretty decent options so I feel like their Java version of the code is a bit of a straw man. Here is how a more modern code style in Java 8 (which is years old now) might look. Notice that the logic for this problem is 7 lines of code, with one line being the closing brace. https://gist.github.com/haroldl/aee6a407a01131345fc4ecb1b9c9... |
|