cost property

num get cost

Computes the sum of all values along the edges of this path.

Implementation

num get cost => values.fold(0, (a, b) => a + b);