merge

Merge arguments with comparison.

TODO is there a compacter (but as efficient) alternative to:

foreach (i, R; Rs) { case i; ... }

For higher type-safety we actually need a specific index type that only be either undefined or lie within range [0 .. Rs.length - 1].

See also: http://forum.dlang.org/thread/gvhqbkbkjbohnjawmvkl@forum.dlang.org#post-tnvzgcklcyutevogjsyi:40forum.dlang.org

merge
(
alias less = "a < b"
Rs...
)
(
Rs rs
)
if (
Rs.length > 1 &&
allSatisfy!(isSortedRange, staticMap!(Unqual, Rs))
&&
)

Meta