In part 1 we looked at a technique that allows expressing strongly-typed variadic functions in a way that solves problems with the current most common approach. It reduces code size and repetition, and it scales to any arity.
I mentioned that the technique can also be extended to higher-order variadic functions, such as the typical zipWith
. Let’s explore how to do that.
As we did in part 1, let’s start with an example, a typical zipWith
on arrays.