binaryOperation
open override fun binaryOperation(operation: String, left: T, right: T): T
Content copied to clipboard
Dynamically invokes a binary operation with the certain name.
Implementations must fulfil the following requirements:
If operation is not defined in the structure, then the function throws kotlin.IllegalStateException.
Equivalence to binaryOperationFunction: for any
a
,b
, andc
,binaryOperationFunction(a)(b, c) == binaryOperation(a, b, c)
.
Return
a result of operation.
Parameters
operation
the name of operation.
left
the first argument of operation.
right
the second argument of operation.
Sources
common source
Link copied to clipboard