Interface PureFunction<A,B>
- Type Parameters:
A- the input typeB- the output type
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A function isomorphic to
Function, but with the expectation that it is pure.
It is obviously impossible to enforce this, so this interface exists purely as a marker to indicate intent.
Purity: We define a pure function as one that, given the same input, will always return the same output, and has no side effects (i.e., it does not modify any external state or interact with the outside world).
-
Method Summary
-
Method Details
-
apply
Applies this pure function to the given argument.- Parameters:
a- the function argument- Returns:
- the function result
-