I think we need something like a fold that also takes an initial value. Otherwise, what if we want the number of edges?