map

fun <IN, OUT> TransactionValue<IN>.map(transformation: (IN) -> OUT): TransactionValue<OUT>

Applies a transformation to a TransactionValue, creating a new, transformed value. This function is type-safe.

Return

A new TransactionValue of type OUT.

Parameters

IN

The input type.

OUT

The output type.

transformation

A function that converts a value of type IN to OUT.