Tab Atkins Jr. (2013-04-17T00:20:13.000Z)
On Tue, Apr 16, 2013 at 5:12 PM, Andrea Giammarchi
<andrea.giammarchi at gmail.com> wrote:
> why is that?
>
> void   forEach(mapCB);
>
> if that's to make it consistent with Array#forEach you should accept the
> context argument in both map and forEach too?

Sorry, I forgot to update their signatures together.  You're right
that it should have the same signature as .map().

> However, I don't get why this should not work:
>
> str.forEach(callback).then(notify);

Hm, so .forEach() just returns the same stream?  Makes sense to me.

> Said that, I think is quite good after some renaming, but probably you need
> to write some more concrete example?

I need to point to a few example pages I've already found, actually.
The ACM page I link in the discussion of .switch() is very good!

> P.S.
>
> had already thoughts about a possible
>
> $(obj).on('loadStatus', updateLoadingUI); ^__^
>
> naaaaa, just kidding

UpdateStream.watch(obj, 'loadStatus').listen(updateLoadingUI);

~TJ
github at esdiscuss.org (2013-07-12T02:26:56.920Z)
On Tue, Apr 16, 2013 at 5:12 PM, Andrea Giammarchi <andrea.giammarchi at gmail.com> wrote:
> why is that?
>
> ```js
> void   forEach(mapCB);
> ```
>
> if that's to make it consistent with Array#forEach you should accept the
> context argument in both map and forEach too?

Sorry, I forgot to update their signatures together.  You're right
that it should have the same signature as .map().

> However, I don't get why this should not work:
>
> ```js
> str.forEach(callback).then(notify);
> ```

Hm, so .forEach() just returns the same stream?  Makes sense to me.

> Said that, I think is quite good after some renaming, but probably you need
> to write some more concrete example?

I need to point to a few example pages I've already found, actually.
The ACM page I link in the discussion of .switch() is very good!

> P.S.
>
> had already thoughts about a possible
>
> ```js
> $(obj).on('loadStatus', updateLoadingUI); ^__^
> ```
>
> naaaaa, just kidding

```js
UpdateStream.watch(obj, 'loadStatus').listen(updateLoadingUI);
```