On Tuesday, 19 March 2013 at 02:09:06 UTC, timotheecour wrote:
I forgot unittest:unittest{ assert(uniqStable([1,3,1,0,2] ==[1, 3, 0, 2] )); } of course, it needs template on less, etc.
Stealing reply from Bearophile: http://forum.dlang.org/post/[email protected]He uses filter2 because filter doesn't cache results, but if you apply distinct() to a range where front() call is "stable" you can use filter.
