The Power of Function Composition — to Find If an Array Is Special

from blog Just Some Code, | ↗ original
Passing the result of a function to another isn’t the only way to compose two functions. From math classes, we’re used to composing two functions like this compose(f, g) = x => f(g(x)). But it turns out there are more ways. That’s my main takeaway from the talk “The Power of Function Composition” by Conor Hoekstra at NDC Conference 2024. Here’s...