From 7f261f7eb8c8e5bea9e40a5c24ec2d3fd2cb5770 Mon Sep 17 00:00:00 2001 From: "H. S. Teoh" Date: Fri, 4 Sep 2015 23:02:00 -0700 Subject: [PATCH] Add Params: and Returns: for nWayUnion. --- std/algorithm/setops.d | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/std/algorithm/setops.d b/std/algorithm/setops.d index 1e9bcb509..ff48d57db 100644 --- a/std/algorithm/setops.d +++ b/std/algorithm/setops.d @@ -761,6 +761,13 @@ NWayUnion) is $(BIGOH n * ror.length * log(ror.length)), i.e., $(D log(ror.length)) times worse than just spanning all ranges in turn. The output comes sorted (unstably) by $(D less). +Params: + less = Predicate the given ranges are sorted by. + ror = A range of ranges sorted by `less` to compute the union for. + +Returns: + A range of the union of the ranges in `ror`. + Warning: Because $(D NWayUnion) does not allocate extra memory, it will leave $(D ror) modified. Namely, $(D NWayUnion) assumes ownership of $(D ror) and discretionarily swaps and advances elements of it. If