compose

infix fun <T, R, V> (R) -> V.compose(other: (T) -> R): (T) -> V

Composes two functions, applying the other function first and then the receiver function.

Return

A composed function that applies the other function followed by the receiver function.

Parameters

T

The input type for the other function.

R

The output type of the other function and input type for the receiver function.

V

The output type of the receiver function.

other

The function to apply before the receiver function.