transform

infix fun transform(function: (FROM) -> TO)

Transforms the result value of a mapping. See the documentation

For example

Person::age fromProperty PersonDto::dateOfBirth transform { it.periodUntil(Clock.todayIn(TimeZone.UTC)) }

will generate an explicit mapping transforming PersonDto.dateOfBirth to the period between it and today.

Parameters

function

the transformation function to transform the value with.