use of a tail-recursive topological-seq