OthersOther answers already discuss it, so I will try to contribute new angles to the analysis.
My take is that your code can only be a strategy pattern if the algorithm is dynamically chosen, i.e. strategy calls cannot be statically defined in code. My example of a table with multiple dispatch support might be considered a strategyAdditionally, or passing athe strategy functionmust be passed to the service layer fora context that will use it to call eventually would also be OKprovide a service operation to a client.
strategy = dispatch[algorithmType] context(strategy) context.operation()
InAlternatively, I would still accept context.operation(strategy). However, I know opinions might differ on what constitutes a valid strategy pattern.
Anyways, you can probably see that in languages that support functions as first-class citizens, the so called-called strategy pattern is just a regular function that encapsulates an algorithm. In OOP languages the function is encapsulated in an object (called a strategy) that you use to reach the function inside it (that’s the case of e.g. Java).
Additionally, you can probably see how powerful it is that the three algorithms operate on the same data structure, instead of having different data structures for every algorithm. This allows the definition of a single “function signature”, a “public interface” that you can use to exploit the pattern of polymorphism i.e. Implement three different functions who'swhose type is the same, but behave completely different. That’s how I could defineddefine a functional dispatch using a map in my example above.