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||Price||Time model||Supported notation|
|#1 reflex· · ·|
|#2 reactive-banana· · ·|
|#3 Netwire· · ·|
|Continuous||Arrow (proc); Monad (do); Applicative|
|#4 sodium· · ·|
|#5 Auto· · ·|
|Discrete||Arrow (proc); Applicative|
|#6 Elerea· · ·|