public abstract class F2<A,B,C>
extends java.lang.Object
A
and B
to C
.
This type can be represented using the Java 7 closure syntax.Constructor and Description |
---|
F2() |
Modifier and Type | Method and Description |
---|---|
F2<Array<A>,Array<B>,Array<C>> |
arrayM()
Promotes this function to a function on Arrays.
|
F<A,F<B,C>> |
curry()
Curries this wrapped function to a wrapped function of arity-1 that returns another wrapped function.
|
F<B,C> |
f(A a)
Partial application.
|
abstract C |
f(A a,
B b)
Transform
A and B to C . |
F2<B,A,C> |
flip()
Flips the arguments of this function.
|
F2<java.lang.Iterable<A>,java.lang.Iterable<B>,IterableW<C>> |
iterableM()
Promotes this function to a function on Iterables.
|
F2<List<A>,List<B>,List<C>> |
listM()
Promotes this function to a function on Lists.
|
F2<NonEmptyList<A>,NonEmptyList<B>,NonEmptyList<C>> |
nelM()
Promotes this function to a function on non-empty lists.
|
F2<Option<A>,Option<B>,Option<C>> |
optionM()
Promotes this function to a function on Options.
|
F2<Promise<A>,Promise<B>,Promise<C>> |
promiseM()
Promotes this function to a function on Promises.
|
F2<Set<A>,Set<B>,Set<C>> |
setM(Ord<C> o)
Promotes this function to a function on Sets.
|
F2<Stream<A>,Stream<B>,Stream<C>> |
streamM()
Promotes this function to a function on Streams.
|
F2<Tree<A>,Tree<B>,Tree<C>> |
treeM()
Promotes this function to a function on Trees.
|
F<P2<A,B>,C> |
tuple()
Uncurries this function to a function on tuples.
|
F2<Array<A>,Array<B>,Array<C>> |
zipArrayM()
Promotes this function to zip two arrays, applying the function lock-step over both Arrays.
|
F2<java.lang.Iterable<A>,java.lang.Iterable<B>,java.lang.Iterable<C>> |
zipIterableM()
Promotes this function to zip two iterables, applying the function lock-step over both iterables.
|
F2<List<A>,List<B>,List<C>> |
zipListM()
Promotes this function to zip two lists, applying the function lock-step over both lists.
|
F2<NonEmptyList<A>,NonEmptyList<B>,NonEmptyList<C>> |
zipNelM()
Promotes this function to zip two non-empty lists, applying the function lock-step over both lists.
|
F2<Set<A>,Set<B>,Set<C>> |
zipSetM(Ord<C> o)
Promotes this function to zip two sets, applying the function lock-step over both sets.
|
F2<Stream<A>,Stream<B>,Stream<C>> |
zipStreamM()
Promotes this function to zip two streams, applying the function lock-step over both streams.
|
F2<Tree<A>,Tree<B>,Tree<C>> |
zipTreeM()
Promotes this function to zip two trees, applying the function lock-step over both trees.
|
F2<TreeZipper<A>,TreeZipper<B>,TreeZipper<C>> |
zipTreeZipperM()
Promotes this function to zip two TreeZippers, applying the function lock-step over both zippers in all directions.
|
F2<Zipper<A>,Zipper<B>,Zipper<C>> |
zipZipperM()
Promotes this function to zip two zippers, applying the function lock-step over both zippers in both directions.
|
public abstract C f(A a, B b)
A
and B
to C
.a
- The A
to transform.b
- The B
to transform.public final F<B,C> f(A a)
a
- The A
to which to apply this function.public final F<A,F<B,C>> curry()
public final F2<B,A,C> flip()
public final F<P2<A,B>,C> tuple()
public final F2<Array<A>,Array<B>,Array<C>> arrayM()
public final F2<Promise<A>,Promise<B>,Promise<C>> promiseM()
public final F2<java.lang.Iterable<A>,java.lang.Iterable<B>,IterableW<C>> iterableM()
public final F2<List<A>,List<B>,List<C>> listM()
public final F2<NonEmptyList<A>,NonEmptyList<B>,NonEmptyList<C>> nelM()
public final F2<Option<A>,Option<B>,Option<C>> optionM()
public final F2<Set<A>,Set<B>,Set<C>> setM(Ord<C> o)
o
- An ordering for the result of the promoted function.public final F2<Stream<A>,Stream<B>,Stream<C>> streamM()
public final F2<Tree<A>,Tree<B>,Tree<C>> treeM()
public final F2<Array<A>,Array<B>,Array<C>> zipArrayM()
public final F2<java.lang.Iterable<A>,java.lang.Iterable<B>,java.lang.Iterable<C>> zipIterableM()
public final F2<List<A>,List<B>,List<C>> zipListM()
public final F2<Stream<A>,Stream<B>,Stream<C>> zipStreamM()
public final F2<NonEmptyList<A>,NonEmptyList<B>,NonEmptyList<C>> zipNelM()
public final F2<Set<A>,Set<B>,Set<C>> zipSetM(Ord<C> o)
o
- An ordering for the resulting set.public final F2<Tree<A>,Tree<B>,Tree<C>> zipTreeM()
public final F2<Zipper<A>,Zipper<B>,Zipper<C>> zipZipperM()
public final F2<TreeZipper<A>,TreeZipper<B>,TreeZipper<C>> zipTreeZipperM()