only issue, I always have to add the last value: `...
# getting-started
d
only issue, I always have to add the last value:
Copy code
val result = values
                .zipWithNext { current, next -> if (next > current) -current else current }
                .sum() + values[values.size-1]