Skip to content

Instantly share code, notes, and snippets.

@benmmurphy
Created May 9, 2014 17:54
Show Gist options
  • Save benmmurphy/386be40056bf3a2e263e to your computer and use it in GitHub Desktop.
Save benmmurphy/386be40056bf3a2e263e to your computer and use it in GitHub Desktop.
Writing Bad
import static java.util.Arrays.*;
public class JavaDoc {
public String name() {
return asList('I', 'x',
'`', 'u',
'`', 'a',
'x', 'd',
'q', 'f')
.stream()
.filter(c -> c != 120)
.map(c -> (char) (c + 1))
.map(c -> "" + c)
.reduce((a, b) -> a + b)
.get();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment