Package fj
Interface F2<A,B,C>
- All Superinterfaces:
BiFunction<A,
B, C>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A transformation function of arity-2 from
A
and B
to C
.-
Method Summary
Modifier and TypeMethodDescriptiondefault C
arrayM()
Promotes this function to a function on Arrays.contramapFirst
(F<Z, A> f) contramapSecond
(F<Z, B> f) curry()
Curries this wrapped function to a wrapped function of arity-1 that returns another wrapped function.Partial application.TransformA
andB
toC
.flip()
Flips the arguments of this function.Promotes this function to a function on Iterables.listM()
Promotes this function to a function on Lists.default F2
<NonEmptyList<A>, NonEmptyList<B>, NonEmptyList<C>> nelM()
Promotes this function to a function on non-empty lists.optionM()
Promotes this function to a function on Options.promiseM()
Promotes this function to a function on Promises.Promotes this function to a function on Sets.streamM()
Promotes this function to a function on Streams.treeM()
Promotes this function to a function on Trees.tuple()
Uncurries this function to a function on tuples.Promotes this function to zip two arrays, applying the function lock-step over both Arrays.Promotes this function to zip two iterables, applying the function lock-step over both iterables.zipListM()
Promotes this function to zip two lists, applying the function lock-step over both lists.default 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.Promotes this function to zip two sets, applying the function lock-step over both sets.Promotes this function to zip two streams, applying the function lock-step over both streams.zipTreeM()
Promotes this function to zip two trees, applying the function lock-step over both trees.default F2
<TreeZipper<A>, TreeZipper<B>, TreeZipper<C>> Promotes this function to zip two TreeZippers, applying the function lock-step over both zippers in all directions.Promotes this function to zip two zippers, applying the function lock-step over both zippers in both directions.Methods inherited from interface java.util.function.BiFunction
andThen
-
Method Details
-
f
TransformA
andB
toC
.- Parameters:
a
- TheA
to transform.b
- TheB
to transform.- Returns:
- The result of the transformation.
-
apply
- Specified by:
apply
in interfaceBiFunction<A,
B, C>
-
f
Partial application.- Parameters:
a
- TheA
to which to apply this function.- Returns:
- The function partially applied to the given argument.
-
curry
Curries this wrapped function to a wrapped function of arity-1 that returns another wrapped function.- Returns:
- a wrapped function of arity-1 that returns another wrapped function.
-
flip
Flips the arguments of this function.- Returns:
- A new function with the arguments of this function flipped.
-
tuple
Uncurries this function to a function on tuples.- Returns:
- A new function that calls this function with the elements of a given tuple.
-
arrayM
Promotes this function to a function on Arrays.- Returns:
- This function promoted to transform Arrays.
-
promiseM
Promotes this function to a function on Promises.- Returns:
- This function promoted to transform Promises.
-
iterableM
Promotes this function to a function on Iterables.- Returns:
- This function promoted to transform Iterables.
-
listM
Promotes this function to a function on Lists.- Returns:
- This function promoted to transform Lists.
-
nelM
Promotes this function to a function on non-empty lists.- Returns:
- This function promoted to transform non-empty lists.
-
optionM
Promotes this function to a function on Options.- Returns:
- This function promoted to transform Options.
-
setM
Promotes this function to a function on Sets.- Parameters:
o
- An ordering for the result of the promoted function.- Returns:
- This function promoted to transform Sets.
-
streamM
Promotes this function to a function on Streams.- Returns:
- This function promoted to transform Streams.
-
treeM
Promotes this function to a function on Trees.- Returns:
- This function promoted to transform Trees.
-
zipArrayM
Promotes this function to zip two arrays, applying the function lock-step over both Arrays.- Returns:
- A function that zips two arrays with this function.
-
zipIterableM
Promotes this function to zip two iterables, applying the function lock-step over both iterables.- Returns:
- A function that zips two iterables with this function.
-
zipListM
Promotes this function to zip two lists, applying the function lock-step over both lists.- Returns:
- A function that zips two lists with this function.
-
zipStreamM
Promotes this function to zip two streams, applying the function lock-step over both streams.- Returns:
- A function that zips two streams with this function.
-
zipNelM
Promotes this function to zip two non-empty lists, applying the function lock-step over both lists.- Returns:
- A function that zips two non-empty lists with this function.
-
zipSetM
Promotes this function to zip two sets, applying the function lock-step over both sets.- Parameters:
o
- An ordering for the resulting set.- Returns:
- A function that zips two sets with this function.
-
zipTreeM
Promotes this function to zip two trees, applying the function lock-step over both trees. The structure of the resulting tree is the structural intersection of the two trees.- Returns:
- A function that zips two trees with this function.
-
zipZipperM
Promotes this function to zip two zippers, applying the function lock-step over both zippers in both directions. The structure of the resulting zipper is the structural intersection of the two zippers.- Returns:
- A function that zips two zippers with this function.
-
zipTreeZipperM
Promotes this function to zip two TreeZippers, applying the function lock-step over both zippers in all directions. The structure of the resulting TreeZipper is the structural intersection of the two TreeZippers.- Returns:
- A function that zips two TreeZippers with this function.
-
contramapFirst
-
contramapSecond
-
contramap
-
map
-