Created
November 21, 2018 09:56
-
-
Save jbrains/ecb542b02e31b02850b8273f26e13319 to your computer and use it in GitHub Desktop.
What obvious way of using Vavr's fold() am I missing here?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private String linesOf(List<String> lines) { | |
StringBuilder stringBuilder = new StringBuilder(); | |
lines.map(line -> stringBuilder.append(line).append(System.lineSeparator())); | |
return stringBuilder.toString(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@jovaneyck Much better, thanks!