concept Boolean in category functional programming
appears as: Boolean

This is an excerpt from Manning's book Grokking Functional Programming.
The body of the function consists of just the call to filter, which takes a function that returns a Boolean. Assuming that words contain “rust” and “java”, and function passed as wordScore is our production function with bonuses and penalties, here’s what happens:
filter is used instead of the for loop we needed in the imperative version.
![]()