Function interfaceを渡す
return type is Stream<R>
public class Outer {
public static void main(String[] args) {
List<Integer> l = List.of(1,2,3,4,5);
l.stream().<String>map(a -> String.valueOf(a) + "xxx").forEach(System.out::println);
}
}
1xxx
2xxx
3xxx
4xxx
5xxx