trait TransformerFSupport[F[+_]] extends AnyRef
Type class supporting lifted transformers.
In order to create lifted transformation from A
to F[B]
,
we need these few operations to be implemented for specific F
wrapper type.
- F
wrapper type constructor
- See also
TransformerFSupport.TransformerFOptionSupport for implementation for
Option
TransformerFSupport.TransformerFEitherErrorAccumulatingSupport for implementation for
Either
- Alphabetic
- By Inheritance
- TransformerFSupport
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def map[A, B](fa: F[A], f: (A) => B): F[B]
Transform wrapped value with given function.
Transform wrapped value with given function.
- A
type of wrapped value
- B
result type of provided function
f
- fa
wrapped value
- f
function
- returns
wrapped result of function
f
applied to un
- abstract def product[A, B](fa: F[A], fb: => F[B]): F[(A, B)]
Combine two wrapped values into wrapped pair of them.
Combine two wrapped values into wrapped pair of them.
This method allows to decide on error handling semantics for given type
F
.- A
type of first value
- B
type of second value
- fa
first wrapped value
- fb
second wrapped value
- returns
wrapped pair of values
- abstract def pure[A](value: A): F[A]
Wrap a value into the type constructor
F
.Wrap a value into the type constructor
F
.- A
type of value
- value
value to wrap
- returns
wrapped value
- abstract def traverse[M, A, B](it: Iterator[A], f: (A) => F[B])(implicit fac: Factory[B, M]): F[M]
Perform traversal of function
f
on provided iterator of elements.Perform traversal of function
f
on provided iterator of elements.Primarily used to perform recursive lifted transformation (given as function
f
) on a collection type (Array, Seq, List, Vector, Map, etc.) for which we can obtain anIterator[A]
.This method allows to decide on error handling semantics for given type
F
, when transforming between collections.- M
type of collection where transformed elements are stored; note that this is not a type constructor, but a type with applied argument, so it can be List[B], Map[K, V], etc.
- A
type of elements being iterated
- B
target element type of function
f
- it
iterator of elements of type
A
- f
function to apply to elements of type
A
, returningF[B]
- fac
factory for collection type
M
- returns
wrapped collection of type
F[M]
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated