FRP, or Functional Reactive Programming, has some basic terms which you need to know.
Every piece of data can be represented as
Observable, which is an asynchronous data stream. The power of FRP is in representation synchronous and asynchronous events as streams,
Observables, and providing the same interface to work with it.
Observable holds several (or none) events that holds the date -
.Next events, and then it can be terminated successfully (
.Success) or with an error (
Let's take a look at following marble diagram:
In this example there is a stream of
Int values. As time moves forward, three
.Next events occurred, and then the stream terminated successfully.
The diagram above shows a case where no data was emitted and
.Error event terminates the
Before we move on, there are some useful resources: