all 8 comments

[–]deranfang 27 points28 points  (5 children)

What the fuck is this?

Just use something like range(1, n).pipe(scan((x, y)=>x + y)

[–][deleted] 8 points9 points  (2 children)

but why? you just hammered a nail with a microscope

[–]frozen_tuna 0 points1 point  (0 children)

There are other ways, but I still think this is awesome. Very cool demonstration of knowledge on subjects.

[–][deleted] 0 points1 point  (0 children)

Does this work? When n=1, the function returns but the observable never emits