Transform
Typeclass that describes type constructors that support the exmap
operation.
class Object
trait Matchable
class Any
Extensions
Extensions
extension [A, B](fa: F[A])
extension [A, B](fa: F[A])
extension [A, B](fa: F[A])
extension [A, B](fa: F[A])
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
.
extension [A, B](fa: F[A])
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
.