binaryOperationFunction

open fun binaryOperationFunction(operation: String): (T, T) -> T

Dynamically dispatches a binary operation with the certain name.

Implementations must fulfil the following requirements:

  1. If operation is not defined in the structure, then the function throws kotlin.IllegalStateException.

  2. Equivalence to binaryOperation: for any a, b, and c, binaryOperationFunction(a)(b, c) == binaryOperation(a, b, c).

Return

an operation.

Parameters

operation

the name of operation.

Sources

common source
Link copied to clipboard