Combines two streams into one using cantor's unpairing function.
Combines two streams into one using cantor's unpairing function. Ensures that the stream terminates if both streams terminate
Applies the interleaving to a finite sequence of streams.
Interleaves a stream of streams.
Interleaves a stream of streams.
If streams = ((1,2,3),(4,5),(6,7,8,9),(10...), Order taken 0 1 2 Order taken 3 4 5 6 7 Order taken 8 9
interleave(streams) = (1, 2, 4, 3, 5, 6, 7, 10, 8, 9...