Transformation

smithy4s.Transformation
See theTransformation companion object
trait Transformation[Func, Input, Output]

Heterogenous function construct, allows to abstract over various kinds of functions whilst providing an homogenous user experience without the user having to manually lift functions from one kind to the other.

// assuming Foo is a code-generated interface
val fooOption: Foo[Option] = ???
val toList = new smithy4s.PolyFunction[Option, List]{def apply[A](fa: Option[A]): List[A] = fa.toList}
val fooList: Foo[List] = foo.transform(toList)

It is possible to plug arbitrary transformations to mechanism, such as cats.arrow.FunctionK

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def apply(f: Func, input: Input): Output