3 ms·
The fundamental building block of FRP is something called a Behavior, which is a container for a value that changes over time. More specifically, it's not just
by dakom 8y ago
The fundamental building block of FRP is something called a Behavior, which is a container for a value that changes over time. More specifically, it's not just any container - but rather one which follows laws that make it a candidate for passing into pure functions that expect certain typeclasses (specifically it's a Functor, Applicative, and some others)
The result is that you can do the same things with a Behavior as you can with other Functors and Applicatives and things - for example you can `map` it with a function that operates on that inner value (whatever it may be) and you'll get a new Behavior which contains that transformed inner value.