Interface F<A,B>
- All Superinterfaces:
Function<A,B>
- All Known Implementing Classes:
IOFunctions.CharChunkReader, IOFunctions.CharChunkReader2, IOFunctions.LineReader
- 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 or function from
A to B.-
Method Summary
Modifier and TypeMethodDescriptionandThen()First-class composition flipped.Function composition flipped.apply()First-class function application in an environment.default BFunction application in an environment (Applicative Functor).arrayK()Promotes this function so that it returns its result in a Array.bind()First-class function binding.Binds a given function across this function (Reader Monad).Returns a function that contramaps over a given actor.Promotes this function to map over an Equal as a contravariant functor.Promotes this function to map over a Hash as a contravariant functor.Promotes this function to map over a Show as a contravariant functor.default <C,D> F <C, D> Both map (with g) and contramap (with f) the target function.Promotes this function so that it returns its result on the left side of an Either.Promotes this function so that it returns its result on the right side of an Either.TransformAtoB.default <C> F<A, Validation<B, C>> failK()Promotes this function so that it returns its result on the failure side of a Validation.foldMapTree(Monoid<B> m) Returns a function that maps this function over a tree and folds it with the given monoid.Promotes this function to return its value in an Iterable.lazy()Promotes this function so that it returns its result in a product-1.listK()Promotes this function so that it returns its result in a List.mapArray()Promotes this function to map over a Array.mapBoth()Promotes this function to map over both elements of a pair.default <X> F<Validation<A, X>, Validation<B, X>> mapFail()Promotes this function to map over the failure side of a Validation.mapFst()Promotes this function to map over the first element of a pair.Promotes this function to map over Iterables.Maps this function over an ArrayList.default ArrayBlockingQueue<B> mapJ(ArrayBlockingQueue<A> as) Maps this function over an ArrayBlockingQueue.default ConcurrentLinkedQueue<B> mapJ(ConcurrentLinkedQueue<A> as) Maps this function over a ConcurrentLinkedQueue.default CopyOnWriteArrayList<B> mapJ(CopyOnWriteArrayList<A> as) Maps this function over a CopyOnWriteArrayList.default CopyOnWriteArraySet<B> mapJ(CopyOnWriteArraySet<A> as) Maps this function over a CopyOnWriteArraySet.default LinkedBlockingQueue<B> mapJ(LinkedBlockingQueue<A> as) Maps this function over a LinkedBlockingQueue.default PriorityBlockingQueue<B> mapJ(PriorityBlockingQueue<A> as) Maps this function over a PriorityBlockingQueue.default SynchronousQueue<B> mapJ(SynchronousQueue<A> as) Maps this function over a SynchronousQueue.default LinkedList<B> mapJ(LinkedList<A> as) Maps this function over a LinkedList.default PriorityQueue<B> mapJ(PriorityQueue<A> as) Maps this function over a PriorityQueue.Maps this function over a TreeSet.mapLeft()Promotes this function to map over the left side of an Either.mapList()Promotes this function to map over a List.default F<NonEmptyList<A>, NonEmptyList<B>> mapNel()Promotes this function to map over a NonEmptyList.Promotes this function to map over an optional value.mapP1()Promotes this function to map over a product-1.Promotes this function to map over a Promise.mapRight()Promotes this function to map over the right side of an Either.Promotes this function to map over a Set.mapSnd()Promotes this function to map over the second element of a pair.Promotes this function to map over a Stream.default <X> F<Validation<X, A>, Validation<X, B>> Promotes this function to map over the success side of a Validation.mapTree()Promotes this function to map over a Tree.default F<TreeZipper<A>, TreeZipper<B>> Promotes this function to map over a TreeZipper.Promotes this function to map over a Zipper.default F<A, NonEmptyList<B>> nelK()Promotes this function to return its value in a NonEmptyList.o()First-class function compositionFunction compositionon()Applies this function over the arguments of another function.Applies this function over the arguments of another function.default F<Validation<B, A>, B> onFail()Returns a function that returns the failure side of a given Validation, or this function applied to the success side.onLeft()Returns a function that returns the left side of a given Either, or this function applied to the right side.onRight()Returns a function that returns the right side of a given Either, or this function applied to the left side.default F<Validation<A, B>, B> Returns a function that returns the success side of a given Validation, or this function applied to the failure side.optionK()Promotes this function so that it returns its result in an Option.Partial application.Promotes this function to a concurrent function that returns a Promise of a value.Promotes this function to return its value in a Set.streamK()Promotes this function so that it returns its result in a Stream.default <C> F<A, Validation<C, B>> successK()Promotes this function so that it returns its result on the success side of an Validation.treeK()Promotes this function to return its value in a Tree.default F<A, TreeZipper<B>> Promotes this function to return its value in a TreeZipper.zipperK()Promotes this function to return its value in a Zipper.
-
Method Details
-
f
-
apply
-
o
-
o
-
andThen
-
andThen
-
bind
Binds a given function across this function (Reader Monad).- Parameters:
g- A function that takes the return value of this function as an argument, yielding a new function.- Returns:
- A function that invokes this function on its argument and then the given function on the result.
-
bind
-
apply
Function application in an environment (Applicative Functor).- Parameters:
g- A function with the same argument type as this function, yielding a function that takes the return value of this function.- Returns:
- A new function that invokes the given function on its argument, yielding a new function that is then applied to the result of applying this function to the argument.
-
apply
-
on
-
on
-
lazy
-
partial
-
mapP1
-
optionK
-
mapOption
-
listK
-
mapList
-
streamK
-
mapStream
-
arrayK
-
mapArray
-
contramapActor
-
promiseK
-
mapPromise
-
eitherLeftK
-
eitherRightK
-
mapLeft
-
mapRight
-
onLeft
-
onRight
-
iterableK
-
mapIterable
-
nelK
Promotes this function to return its value in a NonEmptyList.- Returns:
- This function promoted to return its value in a NonEmptyList.
-
mapNel
Promotes this function to map over a NonEmptyList.- Returns:
- This function promoted to map over a NonEmptyList.
-
setK
-
mapSet
-
treeK
-
mapTree
-
foldMapTree
-
treeZipperK
Promotes this function to return its value in a TreeZipper.- Returns:
- This function promoted to return its value in a TreeZipper.
-
mapTreeZipper
Promotes this function to map over a TreeZipper.- Returns:
- This function promoted to map over a TreeZipper.
-
failK
Promotes this function so that it returns its result on the failure side of a Validation. Kleisli arrow for the Validation failure projection.- Returns:
- This function promoted to return its result on the failure side of a Validation.
-
successK
Promotes this function so that it returns its result on the success side of an Validation. Kleisli arrow for the Validation success projection.- Returns:
- This function promoted to return its result on the success side of an Validation.
-
mapFail
Promotes this function to map over the failure side of a Validation.- Returns:
- This function promoted to map over the failure side of a Validation.
-
mapSuccess
Promotes this function to map over the success side of a Validation.- Returns:
- This function promoted to map over the success side of a Validation.
-
onFail
Returns a function that returns the failure side of a given Validation, or this function applied to the success side.- Returns:
- a function that returns the failure side of a given Validation, or this function applied to the success side.
-
onSuccess
Returns a function that returns the success side of a given Validation, or this function applied to the failure side.- Returns:
- a function that returns the success side of a given Validation, or this function applied to the failure side.
-
zipperK
-
mapZipper
-
contramapEqual
-
contramapHash
-
contramapShow
-
mapFst
-
mapSnd
-
mapBoth
-
mapJ
Maps this function over a SynchronousQueue.- Parameters:
as- A SynchronousQueue to map this function over.- Returns:
- A new SynchronousQueue with this function applied to each element.
-
mapJ
Maps this function over a PriorityBlockingQueue.- Parameters:
as- A PriorityBlockingQueue to map this function over.- Returns:
- A new PriorityBlockingQueue with this function applied to each element.
-
mapJ
Maps this function over a LinkedBlockingQueue.- Parameters:
as- A LinkedBlockingQueue to map this function over.- Returns:
- A new LinkedBlockingQueue with this function applied to each element.
-
mapJ
Maps this function over a CopyOnWriteArraySet.- Parameters:
as- A CopyOnWriteArraySet to map this function over.- Returns:
- A new CopyOnWriteArraySet with this function applied to each element.
-
mapJ
Maps this function over a CopyOnWriteArrayList.- Parameters:
as- A CopyOnWriteArrayList to map this function over.- Returns:
- A new CopyOnWriteArrayList with this function applied to each element.
-
mapJ
Maps this function over a ConcurrentLinkedQueue.- Parameters:
as- A ConcurrentLinkedQueue to map this function over.- Returns:
- A new ConcurrentLinkedQueue with this function applied to each element.
-
mapJ
Maps this function over an ArrayBlockingQueue.- Parameters:
as- An ArrayBlockingQueue to map this function over.- Returns:
- A new ArrayBlockingQueue with this function applied to each element.
-
mapJ
-
mapJ
Maps this function over a PriorityQueue.- Parameters:
as- A PriorityQueue to map this function over.- Returns:
- A new PriorityQueue with this function applied to each element.
-
mapJ
Maps this function over a LinkedList.- Parameters:
as- A LinkedList to map this function over.- Returns:
- A new LinkedList with this function applied to each element.
-
mapJ
-
map
-
contramap
-
dimap
-