Merging one Array with Another

via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu May 7 02:21:56 PDT 2015


On Thursday, 7 May 2015 at 08:03:41 UTC, Andrea Fontana wrote:
> It's not that difficult to implement.
> You just need to implement a merge() range that returns the min 
> of all ranges' front(). Then you can define distinct() for 
> SortedRange as:
>
> merge(sortedrange1, sortedrange2, sortedrange3).uniq
>
> Andrea

Why do you need variadics here? Why the need for sortedrange1, 
sortedrange2 and sortedrange3?

I was only interested in removing equal consequtive elements 
within the same range.


More information about the Digitalmars-d-learn mailing list