From the course: Advanced C#: Functional Programming Patterns

Unlock this course with a free trial

Join today to access over 24,800 courses taught by industry experts.

Learn the composition patterns

Learn the composition patterns

Programming is a constant endeavor to separate code into logical silos. Once we have the functions written and tested, we combine them together to do our work. How we mix together the function calls is a fundamental part of programming. The techniques we use depend on our language, framework, and programming approach. This chapter is an overview of the three types of functional composition patterns promoted in functional programming. I'm talking about functional composition, currying, and pipelining. Composition is a term you might have heard. We use it a lot in programming conversations. In general, it means to put together our programming bits like classes or namespaces into a coherent ensemble. In functional programming, composition has a more specific meaning. It's about combining functions to create new ones. The new function, when called, produces results based on the combination of the original functions. This is not groundbreaking, it's just one of the composition patterns in…

Contents