Check whether a range is empty

Steven Schveighoffer schveiguy at gmail.com
Tue Jul 17 11:20:33 UTC 2018


On 7/15/18 8:56 AM, vino.B wrote:
> On Sunday, 15 July 2018 at 12:18:27 UTC, Steven Schveighoffer wrote:
>> On 7/15/18 7:45 AM, vino.B wrote:
>>> [...]
>>
>> I still don't know why you are using chain here as it equates to the 
>> identity function in this instance:
>> https://github.com/dlang/phobos/blob/3d41721141f31059ca6e77dec2da390fad737955/std/range/package.d#L900 
>>
>>
> 
> Hi Steve,
> 
>   Initially i thought the using "chain" it will merge several ranges for 
> arrays into single range of array, but it doesn't merge into single 
> range of array so i have removed the same from my code.

Ahh, I think you want joiner: 
https://dlang.org/phobos/std_algorithm_iteration.html#joiner

-Steve


More information about the Digitalmars-d-learn mailing list