Appendix C. Comparison of FRP systems
The tables in this appendix relate the primitives named in this book to each system’s API. They’re not necessarily directly equivalent, but you will be able to tell where in that system’s API to start looking. If a field is blank, there is no equivalent.
Variable names give clues, mainly these:
- s—Stream
- c—Cell
- i—Initial value
- h—Handler
- a—Value
Table C.1. Cheat sheet for Sodium, RxJS, and Bacon.JS
Primitive |
Sodium (Java) |
RxJS (JS) |
Bacon.JS (JS) |
---|---|---|---|
Stream | Stream | Rx.Observable | EventStream |
Cell | Cell | Rx.BehaviorSubject | Property |
never | new Stream() | Rx.Observable.of() | Bacon.never() |
constant | new Cell(i) | Rx.Observable.of(i) | Bacon.constant(i) |
map (S) | s.map(f) | s.map(f) | e.map(f) |
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.