FRP is a young field with several competing models, unified by the idea that real-world interaction can essentially be viewed as signal processing: a task where functional code excels. The key insight is that by making time an explicit part of the model, values which change over time can be represented as pure functions without requiring mutation.
An important semantic distinction exists between “continuous” vs. “discrete” models of time in FRP. The continuous model literally incorporates time as an argument to its signal functions, and supports interpolating those functions across arbitrary time values. Discrete-time FRP samples time in steps, preserving sequence but with no concept of moments between its sample points.
Further references on FRP can be found on Wikipedia and the Haskell Wiki. For a comparison of code in practice, frp-zoo shows implementations of a simple example application via several Haskell FRP libraries, plus a few non-FRP implementations.
|7 Recommended Products||Recommendations||Price||Time model||Supported notation|
|#1 reflex· · ·||5 | 0|
|#2 Netwire· · ·||1 | 0|
|Continuous||Arrow (proc); Monad (do); Applicative|
|#3 sodium· · ·||1 | 1|
|#4 reactive-banana· · ·||2 | 2|
|#5 Elerea· · ·||0 | 0|
|#6 Auto· · ·||0 | 0|
|Discrete||Arrow (proc); Applicative|