Using functional reactive programming
A more functional flavor of reactive programming is functional reactive programming (abbreviated as FRP). FRP was first described in the late '90s by Conal Elliott, who was a member of the Microsoft Graphics Research Group at the time, and Paul Hudak, a major contributor to the Haskell programming language. FRP was originally described as a bunch of functions to interact with events and behaviors. Both events and behaviors represent values that change over time. The major difference between these two is that events are values that change discretely over time, whereas behaviors are continuously changing values. There is no mention of an observer-observable pattern in FRP. Also, programs in FRP are written as composable transformations of events and behaviors, and are also termed as compositional event systems (CESs).
Modern implementations of FRP provide constructs to create and transform asynchronous event streams. Also, any form of state change...