(String descr, Function<String, String> func)
| 12 | return Arrays.stream(elements); |
| 13 | } |
| 14 | static void |
| 15 | test(String descr, Function<String, String> func) { |
| 16 | System.out.println(" ---( " + descr + " )---"); |
| 17 | testStream() |
| 18 | .map(func) |
| 19 | .forEach(System.out::println); |
| 20 | } |
| 21 | public static void main(String[] args) { |
| 22 | |
| 23 | test("add brackets", s -> "[" + s + "]"); |