{"comment":{"url":"https://api.github.com/repos/maciasello/most/comments/10204712","html_url":"https://github.com/maciasello/most/commit/fbeafde53ff9601fef898e4ae4be1842e94e8e76#commitcomment-10204712","id":10204712,"user":{"login":"maciasello","id":2512757,"avatar_url":"https://avatars.githubusercontent.com/u/2512757?v=3","gravatar_id":"","url":"https://api.github.com/users/maciasello","html_url":"https://github.com/maciasello","followers_url":"https://api.github.com/users/maciasello/followers","following_url":"https://api.github.com/users/maciasello/following{/other_user}","gists_url":"https://api.github.com/users/maciasello/gists{/gist_id}","starred_url":"https://api.github.com/users/maciasello/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maciasello/subscriptions","organizations_url":"https://api.github.com/users/maciasello/orgs","repos_url":"https://api.github.com/users/maciasello/repos","events_url":"https://api.github.com/users/maciasello/events{/privacy}","received_events_url":"https://api.github.com/users/maciasello/received_events","type":"User","site_admin":false},"position":10,"line":988,"path":"docs/api.md","commit_id":"fbeafde53ff9601fef898e4ae4be1842e94e8e76","created_at":"2015-03-15T20:49:15Z","updated_at":"2015-03-15T20:49:15Z","body":"@briancavalier,\r\n\r\nLet us call this one: <`unfold` -> `since`>\r\n```js\r\nvar streamOfXendingWithZ = most.unfold(function(seed) {\r\n    return when.resolve({value: seed === 6 ? \"z\" : \"x\", done: seed === 6, seed: seed + 1 }).delay(500);\r\n}, 0);\r\nvar startSignal = most.of(\"y\").delay(5000);\r\nstreamOfXendingWithZ.since(startSignal)\r\n    .observe(function(ev) { console.log(ev); })\r\n    .then(console.log.bind(console));\r\n```\r\n\r\nAnd this one: <`periodic` -> `until` -> `since`>\r\n```js\r\nvar main_m = most.periodic(500, \"x\");\r\nvar endSignal = most.of(\"z\").delay(3000);\r\nvar startSignal = most.of(\"y\").delay(5000);\r\nmain_m.until(endSignal).since(startSignal)\r\n    .observe(function(ev) { console.log(ev); })\r\n    .then(console.log.bind(console));\r\n```\r\n\r\nThey both behave differently even though <`periodic` -> `until`> and <`unfold`> streams (i.e. before applying `since`) are equivalent in terms of normal events' values (the count may differ) and end signal values."}}