The Strategy design pattern is often regarded as a substitute for first-class functions in languages that lack them.
So for example say you wanted to pass functionality into an object. In Java you'd have to pass in the object another object which encapsulates the desired behavior. In a language such as Ruby, you'd just pass the functionality itself in the form of an anonymous function.
However I was thinking about it and decided that maybe Strategy offers more than a plain anonymous function does.
This is because an object can hold state that exists independently of the period when it's method runs. However an anonymous function by itself can only hold state that ceases to exist the moment the function finishes execution.
In an object-oriented language that supports first-class functions, does the strategy pattern have any advantage over using functions?