Skip to content

Commit

Permalink
Improve comment
Browse files Browse the repository at this point in the history
  • Loading branch information
nordlow committed May 27, 2015
1 parent e97eab6 commit 7e70009
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion std/range/package.d
Expand Up @@ -8656,7 +8656,17 @@ template CommonElementType(Rs...)
alias isSortedRange(R) = isInstanceOf!(SortedRange, R); // TODO Or use: __traits(isSame, TemplateOf!R, SortedRange)

/**
Merge several sorted ranges with less-than function $(D less).
Merge several sorted ranges with less-than function $(D less) into one single
sorted range containing the sorted union of the elements of inputs assuming.
Example:
-------
auto a = [0, 2, 4];
auto b = [1, 3, 5];
auto c = merge(a.assumeSorted, b.assumeSorted)
assert(equal(c, [0, 1, 2, 3, 4, 5]));
assert(equal(c.retro, [5, 4, 3, 2, 1, 0]));
-------
*/
auto merge(alias less = "a < b", Rs...)(Rs rs) if (Rs.length > 1 &&
allSatisfy!(isSortedRange,
Expand Down

0 comments on commit 7e70009

Please sign in to comment.