raimohanska/bacon.js — pull request #41 by RoboTeddy (2012-12-14 06:53:52+00:00)
Title: Add optional isEqual argument to skipDuplicates

I'm just starting to use Bacon, so feel free to yell at me and/or demand changes and/or jack the feature and implement it to your liking.

Example use case:

```coffeescript

class Vector2
constructor: (@x, @y) ->
@equals = (a, b) ->
return a and b and a.x == b.x and a.y == b.y

pagePoint = $(document).asEventStream("mousemove")
.map((e) -> new Vector2(e.pageX, e.pageY))
.skipDuplicates(Vector2.equals)
```