Interface Profunctor<A,B,PF extends Profunctor<?,?,PF>>

Type Parameters:
A - The type of the left parameter
B - The type of the right parameter
PF - The unification parameter
All Superinterfaces:
Contravariant<A,Profunctor<?,B,PF>>
All Known Subinterfaces:
BiMonoidFactory<A,B,C>, BiPredicate<A,B>, BiSemigroupFactory<A,B,C>, Cartesian<A,B,P>, Cocartesian<A,B,P>, Effect<A>, Fn0<A>, Fn1<A,B>, Fn2<A,B,C>, Fn3<A,B,C,D>, Fn4<A,B,C,D,E>, Fn5<A,B,C,D,E,F>, Fn6<A,B,C,D,E,F,G>, Fn7<A,B,C,D,E,F,G,H>, Fn8<A,B,C,D,E,F,G,H,I>, Iso<S,T,A,B>, Iso.Simple<S,A>, Kleisli<A,B,M,MB>, Lens<S,T,A,B>, Lens.Simple<S,A>, Monoid<A>, MonoidFactory<A,B>, Predicate<A>, Prism<S,T,A,B>, Prism.Simple<S,A>, Schema<Values>, Semigroup<A>, SemigroupFactory<A,B>, TypeSafeKey<A,B>, TypeSafeKey.Simple<A>
All Known Implementing Classes:
$, Absent, AddAll, All, Alter, And, Any, AutoBracket, Between, Both, Bracket, CartesianProduct, CatMaybes, Clamp, CmpEq, CmpEqBy, CmpEqWith, Coalesce, Collapse, Collapse, Compare, Compose, Compose, Concat, Cons, Constantly, Cycle, Difference, Distinct, Downcast, Drop, DropWhile, Empty, Endo, EndoK, Eq, Exchange, Filter, Find, First, Flatten, FoldLeft, FoldRight, Force, GroupBy, GT, GTBy, GTE, GTEBy, GTEWith, GTWith, Head, Id, IfThenElse, InGroupsOf, Init, Inits, Intersection, Intersperse, Into, Into1, Into3, Into4, Into5, Into6, Into7, Into8, Iterate, Join, Last, Last, LazyRec, LeftAll, LeftAll, LeftAny, LeftAny, LiftA2, LiftA3, LiftA4, LiftA5, LiftA6, LiftA7, LT, LTBy, LTE, LTEBy, LTEWith, LTWith, Magnetize, MagnetizeBy, Map, Market, Matching, Max, MaxBy, MaxWith, Merge, Merge, MergeHMaps, MergeMaps, Min, MinBy, MinWith, Not, Occurrences, Or, Over, Partition, Peek, Peek2, Pre, PrependAll, Present, PutAll, RateLimit, Re, ReaderT, ReduceLeft, ReduceRight, Repeat, Replicate, Reverse, RightAll, RightAll, RightAny, RightAny, RunAll, RunAll, ScanLeft, Sequence, Set, Size, Slide, Snoc, Sort, SortBy, SortWith, Span, Tagged, Tail, Tails, Take, TakeWhile, Times, ToArray, ToCollection, ToMap, Trampoline, Trivial, Tupler2, Uncons, Under, Unfoldr, Union, Until, Upcast, View, Xor, Zip, ZipWith
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface Profunctor<A,B,PF extends Profunctor<?,?,PF>> extends Contravariant<A,Profunctor<?,B,PF>>
A dually-parametric functor that maps contravariantly over the left parameter and covariantly over the right.

For more information, read about Profunctors.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    default <Z> Profunctor<Z,B,PF>
    contraMap(Fn1<? super Z,? extends A> fn)
    Contravariantly map A <- B.
    <Z, C> Profunctor<Z,C,PF>
    diMap(Fn1<? super Z,? extends A> lFn, Fn1<? super B,? extends C> rFn)
    Dually map contravariantly over the left parameter and covariantly over the right parameter.
    default <Z> Profunctor<Z,B,PF>
    diMapL(Fn1<? super Z,? extends A> fn)
    Contravariantly map over the left parameter.
    default <C> Profunctor<A,C,PF>
    diMapR(Fn1<? super B,? extends C> fn)
    Covariantly map over the right parameter.
  • Method Details

    • diMap

      <Z, C> Profunctor<Z,C,PF> diMap(Fn1<? super Z,? extends A> lFn, Fn1<? super B,? extends C> rFn)
      Dually map contravariantly over the left parameter and covariantly over the right parameter. This is isomorphic to diMapL(lFn).diMapR(rFn).
      Type Parameters:
      Z - the new left parameter type
      C - the new right parameter type
      Parameters:
      lFn - the left parameter mapping function
      rFn - the right parameter mapping function
      Returns:
      a profunctor over Z (the new left parameter type) and C (the new right parameter type)
    • diMapL

      default <Z> Profunctor<Z,B,PF> diMapL(Fn1<? super Z,? extends A> fn)
      Contravariantly map over the left parameter.
      Type Parameters:
      Z - the new left parameter type
      Parameters:
      fn - the mapping function
      Returns:
      a profunctor over Z (the new left parameter type) and C (the same right parameter type)
    • diMapR

      default <C> Profunctor<A,C,PF> diMapR(Fn1<? super B,? extends C> fn)
      Covariantly map over the right parameter. For all profunctors that are also functors, it should hold that diMapR(f) == fmap(f).
      Type Parameters:
      C - the new right parameter type
      Parameters:
      fn - the mapping function
      Returns:
      a profunctor over A (the same left parameter type) and C (the new right parameter type)
    • contraMap

      default <Z> Profunctor<Z,B,PF> contraMap(Fn1<? super Z,? extends A> fn)
      Contravariantly map A <- B.
      Specified by:
      contraMap in interface Contravariant<A,B>
      Type Parameters:
      Z - the new parameter type
      Parameters:
      fn - the mapping function
      Returns:
      the mapped Contravariant functor instance