toposort
toposort copied to clipboard
Allow passing a sort function as a tie breaker
I'm not sure how difficult this would be. But it would be nice to be able to pass a sort function that would act as a tie breaker so that the final order would always be deterministic.
Case: A and B both depend on C
A
/
C
\
B
if edges are passed as
[ [c, a], [c, b] ]
vs
[ [c, b], [c, a] ]
The result is different.