between and among: worth Phobosization? (reprise)

John Colvin via Digitalmars-d digitalmars-d at puremagic.com
Fri Mar 27 01:28:38 PDT 2015


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...


More information about the Digitalmars-d mailing list