Chapter 15. Creating composable functional libraries
This chapter covers
- Designing functional combinator libraries
- Working with time-varying values
- Composing time-varying values with drawings
- Developing library for modeling financial contracts
A design principle that arises in many aspects of functional programming is compositionality. This means building complex structures from a few primitives using composition operations. We’re describing compositionality in a general sense because it can appear in countless forms. Let’s look at two examples you’re already familiar with.
We’ll begin with the F# type system: there are a few primitive types, such as integer and Boolean, as well as ways of combining them, such as using the * type constructor ...
Get Real-World Functional 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.