-
-
Save xrrocha/9abae5594fcc7afe588fc50caa4e7529 to your computer and use it in GitHub Desktop.
This file contains 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
static Stream<String> transposes(List<WordSplit> splits) { | |
return splits.stream() | |
.filter(split -> split.right.length() > 1) | |
.map(split -> | |
split.left + | |
split.right.substring(1, 2) + | |
split.right.substring(0, 1) + | |
split.right.substring(2)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment