Strategy pattern

The strategy pattern is a behavioral pattern that lets an algorithm vary independently of the clients that use it. In other words, it allows one of a family of algorithms to be selected on-the-fly at runtime.

From an FP perspective, a strategy is just a case of abstracting code at a method level.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset