digitalmars.D.learn - All Unordered Pairs of Elements in a Range
- =?UTF-8?B?Ik5vcmRsw7Z3Ig==?= (4/4) Dec 13 2014 Is there a Phobos method/range for selecting all pairs out of a
- H. S. Teoh via Digitalmars-d-learn (7/13) Dec 13 2014 Sounds like:
- =?UTF-8?B?Ik5vcmRsw7Z3Ig==?= (3/6) Dec 13 2014 Thx.
- =?UTF-8?B?Ik5vcmRsw7Z3Ig==?= (4/7) Dec 14 2014 I guess what's missing here is to make it work for ForwardRanges,
Is there a Phobos method/range for selecting all pairs out of a range without caring about the ordering within each pair? Example: [1,2,3] => [(1,2), (2,3), (3,1)]
Dec 13 2014
On Sat, Dec 13, 2014 at 10:24:50PM +0000, "Nordlöw" via Digitalmars-d-learn wrote:Is there a Phobos method/range for selecting all pairs out of a range without caring about the ordering within each pair? Example: [1,2,3] => [(1,2), (2,3), (3,1)]Sounds like: https://issues.dlang.org/show_bug.cgi?id=6788 T -- Beware of bugs in the above code; I have only proved it correct, not tried it. -- Donald Knuth
Dec 13 2014
On Saturday, 13 December 2014 at 23:08:13 UTC, H. S. Teoh via Digitalmars-d-learn wrote:Thx.[1,2,3] => [(1,2), (2,3), (3,1)]Sounds like: https://issues.dlang.org/show_bug.cgi?id=6788
Dec 13 2014
On Saturday, 13 December 2014 at 23:08:13 UTC, H. S. Teoh via Digitalmars-d-learn wrote:Sounds like: https://issues.dlang.org/show_bug.cgi?id=6788 TI guess what's missing here is to make it work for ForwardRanges, right?
Dec 14 2014