Creating a Schema Transformation Between Two Types

Is there a way to create a transformation between the Types of two schemas?
Put another way, given the following definitions
Foo: Schema<A, I>
Bar: Schema<B, J>
encode: (bar: B) => A
decode: (foo: A) => B

Is there a neat way I can create a Schema<B, A>?
As I understand, a regular transformation would be Schema<B, I>.
Was this page helpful?