//for a sorted array
var iterator = function(value) { return value === 1; };
var numbers = [1, 2, 2, 3, 4, 4];
expect(_.uniq(numbers, true, iterator)).to.eql([1, 2]);
Quick question. I'm writing my own version of _.uniq from the Underscore library. I have one test case that I can't pass simply because I don't understand it. From the above test conditions; how could applying _.uniq produce [1, 2] as the end result? I don't see what it's trying to get me to implement here as that's not even unique in any sense. Any ideas?