Transforming data-classes with a function

A somewhat related topic has been discussed here: Tuple Interfaces (for data classes) - #2 by kevinherron