Is it possible to use Java's streams to compute the (absolute) change between list members? If so, how and would it be preferable to looping (for other than aesthetic reasons)? Currently, I'm implementing this as follows:
List<Double> series; // Populated with, e.g., time series data
List<Double> seriesChanges = new ArrayList<>();
for (int i = 1; i < series.size(); i++) {
seriesChanges.add(Math.abs(series.get(i-1) - series.get(i)));
}