上QQ阅读APP看书,第一时间看更新
Some base elements of functional programming
Many of the examples described in this book follow the functional programming paradigm. Since ReactiveX is already using several principals of functional programming, it is a natural way to structure such applications. However, only a subset of the functional programming principals will be used. The structure and separation of responsibilities that will be done in the code rely on the following:
- Lambdas and closure: These ease the readability of the code
- Side effects and pure functions: These allow you to write deterministic and testable code
- Higher-order functions: These are building blocks for many code constructs