|
|
@@ -2,7 +2,7 @@ import java.util.ArrayList;
|
|
2
|
2
|
import java.util.List;
|
|
3
|
3
|
import java.util.function.Function;
|
|
4
|
4
|
|
|
5
|
|
-public class Accumulate {
|
|
|
5
|
+public class Accumulate {
|
|
6
|
6
|
|
|
7
|
7
|
public static <T> List<T> accumulate(List<T> collection, Function<T, T> function) {
|
|
8
|
8
|
List<T> newCollection = new ArrayList<>();
|