When you have unused block parameters, use _ to indicate it is not used, eg. |_, v|. Also, whitespace in the block.

Further, this is O(2n) on link transitions is it not?