topoSort: Combine multiple sorted vectors into a single sorted vector
Description
Combine multiple sorted vectors into a single vector assuming there are no cycles or weird topologies. Where a global position is ambiguous, the result is placed arbitrarily.
a vector with all unique elements sorted by the combined ordering provided by the input vectors
Arguments
vectors
A list of vectors each vector containing sorted elements to be merged into a global sorted vector
maxIter
An integer specifying the maximum number of iterations before bailing out. This should be unnecessary and is just a safety feature in case of some unexpected input or bug.