Nice read, thanks for sharing, Victor!

I have a question: in the final version, why does `averageSalary` accept a list of `Predicate`s and implicitly combines them with `and` (which needs to be documented and part of the contract of the function), rather than accepting a single `Predicate` and letting callers to combine multiple `Predicate`s into a single one in whatever way they want if necessary (possibly with `and`, but alternatively with `or` or in whatever way they prefer)?

Written by

Software Engineer at Google. Space-Time explorer.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store