In [efficient sorted Cartesian product of 2 sorted array of integers](https://stackoverflow.com/questions/4299458/efficient-sorted-cartesian-product-of-2-sorted-array-of-integers) a lazy algorithm is suggested to generate ordered cartesian products for two sorted integer arrays.

I curious to know if there is a generalisation of this algorithm to more arrays.

For example say we have 5 sorted arrays of doubles

(0.7, 0.2, 0.1)

(0.6, 0.3, 0.1)

(0.5, 0.25, 0.25)

(0.4, 0.35, 0.25)

(0.35, 0.35, 0.3)

I am interested in generating the ordered cartesian product without having to calculate all possible combinations. 

Appreciate any ideas on how a possible lazy cartesian product algorithm would possibly extend to dimensions beyond 2.