Function frunk_core::generic::map_inter
source · pub fn map_inter<Inter, Origin, Mapper>(val: Origin, mapper: Mapper) -> Originwhere
Origin: Generic,
Inter: Generic<Repr = Origin::Repr>,
Mapper: FnOnce(Inter) -> Inter,
Expand description
Maps a value of a given type Origin
using a function on
a type Inter
which has the same representation type of Origin
.
Note that the compiler will have a hard time inferring the type variable
Inter
. Thus, using map_inter
is mostly effective if the type is
constrained by the input function or by the body of a lambda.