Description

The functions can be quite slow in some cases, but it's easy to improve
the performance. I've just used Data.Sequence instead of ordinary lists.
This makes especially large difference for scc (strongly connected
components). In one extreme case I found:

So I did some more testing, this time using also the GHC's version of postorder.
And it turns out it is slightly (but consistently) faster than the one I wrote
(based on Data.Sequence). So I decided to try the same trick with preorder: