unaryOperation

open fun unaryOperation(operation: String, arg: T): T

Dynamically invokes an unary operation with the certain name.

This function must follow two properties:

  1. In case if operation is not defined in the structure, the function throws kotlin.IllegalStateException.

  2. This function is symmetric with second unaryOperationFunction overload: i.e. unaryOperationFunction(a)(b) == unaryOperation(a, b).

Return

a result of operation.

Parameters

operation

the name of operation.

arg

the argument of operation.