- Learning Functional Programming in Go
- Lex Sheehan
- 65字
- 2021-07-02 23:13:34
Combinator pattern
Since Go supports passing functions around as values, we can create predicate combinators to build more complex predicates from simpler ones.
Combinator pattern: Creating systems by combining more primitive functions into more complex functions.
We'll pe deeper into the composition and the combinator pattern later in the book. Now, let's look a little closer at the map and filter functions.