Map<V, Vertex<V>> sinks(Iterable<Edge<V>> edges) => entries .fold({}, (a, c) => {...a, if (edges.isSinkById(c.key)) c.key: c.value});