Chapter 2. Core FRP

This chapter covers

  • Stream and Cell types
  • map, merge, hold, snapshot, filter, lift, never, and constant primitives
  • Forward references with StreamLoop and CellLoop
  • Making an accumulator with hold and snapshot

To demonstrate the core principles of FRP, in the first few chapters of this book we’ll use our Sodium library in Java. We chose Java because it has static typing (which works well with FRP), and the syntax turns out to be quite nice. We’re trying to teach the concepts of FRP, not the implementation details of specific systems. We designed Sodium to embody those basic concepts as minimally and completely as possible. Sodium and Java are just a convenient vehicle for this purpose; we hope you won’t see this book ...

Get Functional Reactive Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.