steveklabnik / frappuccino

Functional Reactive Programming in Ruby.
https://github.com/steveklabnik/frappuccino
MIT License
354 stars 33 forks source link

Use Property for #inject implementation #15

Closed seadowg closed 11 years ago

seadowg commented 11 years ago

This switches the #inject implementation to use a Property rather than the original Inject implementation. This did mean removing one piece of functionality as Property does not have an #on_value hook. I would actually vote for not having callbacks on Property anyway as a Behaviour in FRP is really a time -> value function and so doesn't have any discrete changes. Giving it a callback hook muddles all this up (discrete changes are what we have event streams for). This is probably worth a more in depth discussion though :smile:.

I also made some changes to the tests to remove some of the #inject uses so we're not mixing Properties into too many of the Stream tests.

coveralls commented 11 years ago

Coverage Status

Coverage remained the same when pulling d7056decb86b1853c3e13de6a5949f449c3ded57 on seadowg:inject into c4a33658285d33ffea0346c471d8d36a2a39553f on steveklabnik:master.

seadowg commented 11 years ago

Oh I've realised I've made the README a lie. I'll fix that.

coveralls commented 11 years ago

Coverage Status

Coverage remained the same when pulling 17f0a494793618b033927d85988a9261a790c914 on seadowg:inject into c4a33658285d33ffea0346c471d8d36a2a39553f on steveklabnik:master.

steveklabnik commented 11 years ago

Awesome. :+1:

seadowg commented 11 years ago

:heart:

On Wed, May 8, 2013 at 10:48 PM, Steve Klabnik notifications@github.com wrote:

Awesome. :+1:

Reply to this email directly or view it on GitHub: https://github.com/steveklabnik/frappuccino/pull/15#issuecomment-17650570