WHAT’S IN THIS CHAPTER?
- Unit-testing a partial function application
- Adding a partial function application to an existing object with an aspect
- Distinguishing between a partial function application and currying
WROX.COM CODE DOWNLOADS FOR THIS CHAPTER
The wrox.com code downloads for this chapter are found at
Occasionally, you will use a function that has several arguments, but some of those arguments will always have the same values. Rather than supplying those values over and over again, it can be convenient to create a new function that wraps the original, supplying the constant arguments and exposing the rest. This technique is called partial function application.
UNIT-TESTING A PARTIAL FUNCTION APPLICATION