After having seen several OOP design patterns, it may seem a cheat to say that there's no approved, official, or even remotely generally accepted similar list of patterns for FP. There are, however,several problems for which there are standard FP solutions, which can be considered design patterns on their own, and we have already covered most of them in the book.
What are candidates for a possible list of patterns? Let's attempt preparing one -- but remember, it's just a personal view; also, I'll admit that I'm not trying to mimic the usual style ofpattern definition--I'll just be mentioning a general problem and refer to the way FP in JS can solve it, and I won't be aiming for nice, short, memorable names for the patterns either:
- Processing collections using filter/map/reduce:Whenever you have to process a data collection...