Two parameter lists are used to allow the Scala compiler to use the Type A
to infer the function arguments in the second parameter list.

Incidentally, if we go with implicits then I think we should also have
implicits for pregel (e.g., graph.pregel(...)).