scalaz / scalaz-reactive

A high-performance, purely-functional library for reactive programming based on efficient incremental computation
Apache License 2.0
24 stars 10 forks source link

Proposal for an IO interpreter #13

Open VledicFranco opened 6 years ago

VledicFranco commented 6 years ago

After composing the API, we need to convert the resulting data structure into executable IOs. Propose a simple interpreter (a function from Behaviour[A] to IO[A]) to test our examples and see them running

kolov commented 6 years ago

What about Sink, as defined in Chapter 8 of the paper? Something about Events is implemented, extend it for Behaviour.

kolov commented 6 years ago

Proposal: implement Sink, as defined in chapter 8 in the book - see https://github.com/scalaz/scalaz-reactive/blob/d1cc9027658527e4436c665e14d489cbf9c21f79/core/src/main/scala/scalaz/reactive/Sink.scala

Given that at the moment our Future is an IO, Sink naturally produces another IO[Void,()].