Transformed

class Transformed<IN, out OUT>(val source: TransactionValue<IN>, val transform: (IN) -> OUT) : TransactionValue<OUT>

Another value with a function applied to it, run when that value is resolved.

Parameters

source

Where the input comes from.

transform

What to do to it.

Constructors

Link copied to clipboard
constructor(source: TransactionValue<IN>, transform: (IN) -> OUT)

Properties

Link copied to clipboard
internal val position: Int

Which application of map this is, counting from the one nearest the source.

Link copied to clipboard
Link copied to clipboard
val transform: (IN) -> OUT

Functions

Link copied to clipboard
fun <IN, OUT> TransactionValue<IN>.map(transformation: (IN) -> OUT): TransactionValue<OUT>

Applies transformation to this value once it resolves.

Link copied to clipboard

Marks this map to be spread into parameters of its own rather than assigned to one.

Link copied to clipboard
open override fun toString(): String

The chain that will produce this value, as far as a value holding no plan can say.