Represents piecewise-defined function.
the piece key type.
the sub-function type.
Returns the appropriate sub-function for given piece key.