September 2016
Intermediate to advanced
408 pages
9h 18m
English
The third and final approach to FRP we'll take a look at is Reactive-banana. Like Yampa, we have both continuous- and discrete-time semantics at our disposal. In Reactive-banana terminology, events describe discrete time, while behaviors describe continuous time. Behaviors in Reactive-banana are like signals in Elerea. Historically, the names event and behavior were the first to occur:
data Event a -- instance Functor data Behavior a -- instance Functor, Applicative
Note that behavior is not Monad, unlike Elerea's signal, which did have a
Monad instance. Instead, Reactive-banana supports moments as reactive computation contexts. There is a pure Moment monad, impure MomentIO monad and MonadMoment class ...
Read now
Unlock full access