
上QQ阅读APP看书,第一时间看更新
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.