java.lang.Object
com.jnape.palatable.lambda.functions.builtin.fn2.Both<A,B,C>
Type Parameters:
A - both function's input type
B - the first function return type
C - the second function return type
All Implemented Interfaces:
Fn1<Fn1<? super A,? extends B>,Fn1<Fn1<? super A,? extends C>,Fn1<A,Tuple2<B,C>>>>, Fn2<Fn1<? super A,? extends B>,Fn1<? super A,? extends C>,Fn1<A,Tuple2<B,C>>>, Fn3<Fn1<? super A,? extends B>,Fn1<? super A,? extends C>,A,Tuple2<B,C>>, Applicative<Fn1<Fn1<? super A,? extends C>,Fn1<A,Tuple2<B,C>>>,Fn1<Fn1<? super A,? extends B>,?>>, Cartesian<Fn1<? super A,? extends B>,Fn1<Fn1<? super A,? extends C>,Fn1<A,Tuple2<B,C>>>,Fn1<?,?>>, Cocartesian<Fn1<? super A,? extends B>,Fn1<Fn1<? super A,? extends C>,Fn1<A,Tuple2<B,C>>>,Fn1<?,?>>, Contravariant<Fn1<? super A,? extends B>,Profunctor<?,Fn1<Fn1<? super A,? extends C>,Fn1<A,Tuple2<B,C>>>,Fn1<?,?>>>, Functor<Fn1<Fn1<? super A,? extends C>,Fn1<A,Tuple2<B,C>>>,Fn1<Fn1<? super A,? extends B>,?>>, Profunctor<Fn1<? super A,? extends B>,Fn1<Fn1<? super A,? extends C>,Fn1<A,Tuple2<B,C>>>,Fn1<?,?>>, Monad<Fn1<Fn1<? super A,? extends C>,Fn1<A,Tuple2<B,C>>>,Fn1<Fn1<? super A,? extends B>,?>>, MonadReader<Fn1<? super A,? extends B>,Fn1<Fn1<? super A,? extends C>,Fn1<A,Tuple2<B,C>>>,Fn1<Fn1<? super A,? extends B>,?>>, MonadRec<Fn1<Fn1<? super A,? extends C>,Fn1<A,Tuple2<B,C>>>,Fn1<Fn1<? super A,? extends B>,?>>, MonadWriter<Fn1<? super A,? extends B>,Fn1<Fn1<? super A,? extends C>,Fn1<A,Tuple2<B,C>>>,Fn1<Fn1<? super A,? extends B>,?>>

public final class Both<A,B,C> extends Object implements Fn3<Fn1<? super A,? extends B>,Fn1<? super A,? extends C>,A,Tuple2<B,C>>
Given two functions f and g, produce a Fn1<A, Tuple2<B, C>> (the dual application of both functions).
  • Field Details

    • INSTANCE

      private static final Both<?,?,?> INSTANCE
  • Constructor Details

    • Both

      private Both()
  • Method Details

    • checkedApply

      public Tuple2<B,C> checkedApply(Fn1<? super A,? extends B> f, Fn1<? super A,? extends C> g, A a)
      Specified by:
      checkedApply in interface Fn3<Fn1<? super A,? extends B>,Fn1<? super A,? extends C>,A,Tuple2<B,C>>
    • both

      public static <A, B, C> Both<A,B,C> both()
    • both

      public static <A, B, C> Fn1<Fn1<? super A,? extends C>,Fn1<A,Tuple2<B,C>>> both(Fn1<? super A,? extends B> f)
    • both

      public static <A, B, C> Fn1<A,Tuple2<B,C>> both(Fn1<? super A,? extends B> f, Fn1<? super A,? extends C> g)
    • both

      public static <A, B, C> Tuple2<B,C> both(Fn1<? super A,? extends B> f, Fn1<? super A,? extends C> g, A a)