SUMMARY

There is nothing complex about the implementation of Map, Filter, or Fold, but they can solve almost arbitrarily complex problems. This fact, coupled with the effect of easy pattern recognition for other programmers, should give you food for thought when you find yourself writing algorithms with loops next time — perhaps a few cleverly applied standard higher order functions would be a better approach? It is also a good idea to use these functions as starting points for your own general purpose helpers!

Get Functional Programming in C#: Classic Programming Techniques for Modern Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.