3.6 Picking an order for parameters based on partial functions
The term partial function is widely used to describe the partial application of a function. Some of the argument values are fixed, while others vary. We might have a function, , where there are fixed values for and . With fixed values, we have a new version of the function, .
When we look at complex functions, we’ll sometimes see a pattern in the ways we use the function. We might, for example, evaluate a function many times with some argument values that are fixed by context, and other argument values that are changing with the details of the processing. Having some fixed argument values suggests a partial function.
Creating a partial function can simplify our programming by avoiding code to repeat the argument values that are fixed by a specific context.
3.6.1 Getting ready
We’ll look at a version of the haversine formula. This computes distances between...