{"action":"created","issue":{"url":"https://api.github.com/repos/rpominov/kefir/issues/186","repository_url":"https://api.github.com/repos/rpominov/kefir","labels_url":"https://api.github.com/repos/rpominov/kefir/issues/186/labels{/name}","comments_url":"https://api.github.com/repos/rpominov/kefir/issues/186/comments","events_url":"https://api.github.com/repos/rpominov/kefir/issues/186/events","html_url":"https://github.com/rpominov/kefir/issues/186","id":137090376,"number":186,"title":"question: canonical way to get \"difference\" of a stream","user":{"login":"boneskull","id":924465,"avatar_url":"https://avatars.githubusercontent.com/u/924465?v=3","gravatar_id":"","url":"https://api.github.com/users/boneskull","html_url":"https://github.com/boneskull","followers_url":"https://api.github.com/users/boneskull/followers","following_url":"https://api.github.com/users/boneskull/following{/other_user}","gists_url":"https://api.github.com/users/boneskull/gists{/gist_id}","starred_url":"https://api.github.com/users/boneskull/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boneskull/subscriptions","organizations_url":"https://api.github.com/users/boneskull/orgs","repos_url":"https://api.github.com/users/boneskull/repos","events_url":"https://api.github.com/users/boneskull/events{/privacy}","received_events_url":"https://api.github.com/users/boneskull/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2016-02-28T20:08:17Z","updated_at":"2016-02-29T00:52:27Z","closed_at":"2016-02-29T00:48:15Z","body":"Say I have a stream `foos` which uses `filter()`:\r\n\r\n```js\r\nvar bars = foos.filter(value => value === 'bar')\r\n  .onValue(doSomething);\r\n```\r\n\r\nI want everything in `foos` which is *not* in `bars` (like [_.difference()](https://lodash.com/docs#difference)).\r\n\r\nNaively, you could write:\r\n\r\n```js\r\nvar notBars = foo.filter(value => value !== 'bar')\r\n  .onValue(doSomethingElse);\r\n```\r\n\r\nI thought I might be able to use `diff()` for this, but the documentation makes it sound like it's not applicable."},"comment":{"url":"https://api.github.com/repos/rpominov/kefir/issues/comments/189982036","html_url":"https://github.com/rpominov/kefir/issues/186#issuecomment-189982036","issue_url":"https://api.github.com/repos/rpominov/kefir/issues/186","id":189982036,"user":{"login":"boneskull","id":924465,"avatar_url":"https://avatars.githubusercontent.com/u/924465?v=3","gravatar_id":"","url":"https://api.github.com/users/boneskull","html_url":"https://github.com/boneskull","followers_url":"https://api.github.com/users/boneskull/followers","following_url":"https://api.github.com/users/boneskull/following{/other_user}","gists_url":"https://api.github.com/users/boneskull/gists{/gist_id}","starred_url":"https://api.github.com/users/boneskull/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boneskull/subscriptions","organizations_url":"https://api.github.com/users/boneskull/orgs","repos_url":"https://api.github.com/users/boneskull/repos","events_url":"https://api.github.com/users/boneskull/events{/privacy}","received_events_url":"https://api.github.com/users/boneskull/received_events","type":"User","site_admin":false},"created_at":"2016-02-29T00:52:27Z","updated_at":"2016-02-29T00:52:27Z","body":"But yes, then it seems `stream.not(otherStream)` would be handy.  If the mood hits you to implement such a helper, please consider this one.  :smile: "}}