On Friday, 27 March 2015 at 01:53:22 UTC, H. S. Teoh wrote:
On Fri, Mar 27, 2015 at 01:37:45AM +0000, Vladimir Panteleev via Digitalmars-d wrote:
On Thursday, 26 March 2015 at 22:23:12 UTC, Andrei Alexandrescu wrote:
>New idea:
>
>bool ordered(pred = "a < b")(T...)(T values)

So... isSorted for tuples?

That's pretty much what it is, and I'm wondering why use a completely
different name rather than overload isSorted.


T

import std.typecons : ∑ = tuple;

∑(a, x, b).isSorted;

Or maybe not, haha! It's kinda tempting for personal projects, as ∑ is just alt-w on my macbook...

Reply via email to