Solution to fe94: Using Stream.map and Stream.filter
See code at solutions/code/tutorialquestions/questionfe94
Compare your solution to the sample answer.
In reverseEachString
, note the syntax StringBuilder::new
for mapping the constructor of StringBuilder
that takes a String
argument over a stream of String
s to get a stream of StringBuilder
s.
Think about the differences in readability between the standard and monolithic versions you have implemented, and whether you have a preference.