Function composition: What’s the big deal?
People treat function composition with a great deal of respect in the functional programming community. But if you look at what function composition is, you might be left confused. After all, it’s not a complex idea. We take two functions and smush them together. What’s the big deal?
Even if you’re comfortable with composition, you’ll find people use many variations. In different libraries, you’ll find compose(), flow() and pipe() (sometimes with different names). What’s the difference? And what are they useful for?