rmap

Function rmap 

Source
pub fn rmap<A, B, C, F, Pab, Pac>(b2c: F, profunctor: Pab) -> Pac
where A: 'static, B: 'static, C: 'static, F: Fn(B) -> C + 'static, Pab: Profunctor<A, B, Pro<A, C> = Pac>,
Expand description

Maps the output of a Profunctor (covariant mapping). rmap(f, p) is equivalent to p.dimap(id, f).

If p: P<A,B> and f: B->C, then rmap(f, p) results in P<A,C>.

§Parameters

  • b2c: The function B -> C to post-compose with the profunctor’s output.
  • profunctor: The Profunctor<A, B> instance.

§Returns

A new profunctor Profunctor::Pro<A, C>.