Replaces the A
value in F[A]
with the supplied value.
Replaces the A
value in F[A]
with the supplied value.
Tuple the values in fa with the result of applying a function with the value
Tuple the values in fa with the result of applying a function with the value
Lift a function f to operate on Functors
Lift a function f to operate on Functors
Empty the fa of the values, preserving the structure
Empty the fa of the values, preserving the structure
Lifts natural subtyping covariance of covariant Functors.
Lifts natural subtyping covariance of covariant Functors.
NOTE: In certain (perhaps contrived) situations that rely on universal
equality this can result in a ClassCastException
, because it is
implemented as a type cast. It could be implemented as map(identity)
, but
according to the functor laws, that should be equal to fa
, and a type
cast is often much more performant.
See this example
of widen
creating a ClassCastException
.