Transform
Typeclass that describes type constructors that support the exmap
operation.
Attributes
- Source:
- Transform.scala
- Graph
- Supertypes
- Known subtypes
- object given_Transform_Codec.typeobject given_Transform_Decoder.typeobject given_Transform_Encoder.type
Members list
Extensions
Extensions
Transforms supplied F[A]
to an F[B]
using two functions, A => Attempt[B]
and B => Attempt[A]
.
Transforms supplied F[A]
to an F[B]
using two functions, A => Attempt[B]
and B => Attempt[A]
.
Attributes
- Source:
- Transform.scala
Curried version of xmap.
Transforms supplied F[A]
to an F[B]
using two functions, A => B
and B => Option[A]
.
Transforms supplied F[A]
to an F[B]
using two functions, A => B
and B => Option[A]
.
Particularly useful when combined with case class apply/unapply. E.g., widenOpt(fa, Foo.apply, Foo.unapply)
.
Attributes
- Source:
- Transform.scala
Transforms supplied F[A]
to an F[B]
using two functions, A => Attempt[B]
and B => A
.
Transforms supplied F[A]
to an F[B]
using two functions, A => Attempt[B]
and B => A
.
The supplied functions form an injection from B
to A
. Hence, converting a F[A]
to a F[B]
converts from
a larger to a smaller type. Hence, the name narrow
.
Attributes
- Source:
- Transform.scala
Transforms supplied F[A]
to an F[B]
using two functions, A => B
and B => Attempt[A]
.
Transforms supplied F[A]
to an F[B]
using two functions, A => B
and B => Attempt[A]
.
The supplied functions form an injection from A
to B
. Hence, converting a F[A]
to a F[B]
converts from
a smaller to a larger type. Hence, the name widen
.
Attributes
- Source:
- Transform.scala
Transforms supplied F[A]
to an F[B]
using the isomorphism described by two functions,
A => B
and B => A
.
Transforms supplied F[A]
to an F[B]
using the isomorphism described by two functions,
A => B
and B => A
.
Attributes
- Source:
- Transform.scala