Re: The return of std.algorithm.find

2016-11-15 Thread Steven Schveighoffer via Digitalmars-d-learn
On 11/15/16 4:43 AM, RazvanN wrote: The find function which receives an input haystack and a needle returns the haystack advanced to the first occurrence of the needle. For normal ranges this is fine, but for sorted ranges (aka SortedRange) it is a bit odd. For example: find(assumeSorted[1, 2,

Re: The return of std.algorithm.find

2016-11-15 Thread Stefan Koch via Digitalmars-d-learn
On Tuesday, 15 November 2016 at 09:50:40 UTC, RazvanN wrote: On Tuesday, 15 November 2016 at 09:43:27 UTC, RazvanN wrote: The find function which receives an input haystack and a needle returns the haystack advanced to the first occurrence of the needle. For normal ranges this is fine, but for

Re: The return of std.algorithm.find

2016-11-15 Thread drug via Digitalmars-d-learn
15.11.2016 12:50, RazvanN пишет: On Tuesday, 15 November 2016 at 09:43:27 UTC, RazvanN wrote: The find function which receives an input haystack and a needle returns the haystack advanced to the first occurrence of the needle. For normal ranges this is fine, but for sorted ranges (aka

Re: The return of std.algorithm.find

2016-11-15 Thread Ali Çehreli via Digitalmars-d-learn
On 11/15/2016 01:50 AM, drug wrote: 15.11.2016 12:48, drug пишет: 15.11.2016 12:43, RazvanN пишет: The find function which receives an input haystack and a needle returns the haystack advanced to the first occurrence of the needle. For normal ranges this is fine, but for sorted ranges (aka

Re: The return of std.algorithm.find

2016-11-15 Thread drug via Digitalmars-d-learn
15.11.2016 12:48, drug пишет: 15.11.2016 12:43, RazvanN пишет: The find function which receives an input haystack and a needle returns the haystack advanced to the first occurrence of the needle. For normal ranges this is fine, but for sorted ranges (aka SortedRange) it is a bit odd. For

Re: The return of std.algorithm.find

2016-11-15 Thread RazvanN via Digitalmars-d-learn
On Tuesday, 15 November 2016 at 09:43:27 UTC, RazvanN wrote: The find function which receives an input haystack and a needle returns the haystack advanced to the first occurrence of the needle. For normal ranges this is fine, but for sorted ranges (aka SortedRange) it is a bit odd. For

Re: The return of std.algorithm.find

2016-11-15 Thread drug via Digitalmars-d-learn
15.11.2016 12:43, RazvanN пишет: The find function which receives an input haystack and a needle returns the haystack advanced to the first occurrence of the needle. For normal ranges this is fine, but for sorted ranges (aka SortedRange) it is a bit odd. For example: find(assumeSorted[1, 2, 4,

The return of std.algorithm.find

2016-11-15 Thread RazvanN via Digitalmars-d-learn
The find function which receives an input haystack and a needle returns the haystack advanced to the first occurrence of the needle. For normal ranges this is fine, but for sorted ranges (aka SortedRange) it is a bit odd. For example: find(assumeSorted[1, 2, 4, 5, 6, 7], 4) would return [4, 5,