object MonadUtil
- Alphabetic
- By Inheritance
- MonadUtil
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
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 batchedSequentialTraverse[X, M[_], S](parallelism: Int, batchSize: Int)(xs: Seq[X])(f: (Seq[X]) => M[Seq[S]])(implicit monad: Monad[M]): M[Seq[S]]
Batched version of sequential traverse
Batched version of sequential traverse
Can be used to avoid overloading the database queue
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def foldLeftM[M[_], S, A](initialState: S, xs: Iterable[A])(step: (S, A) => M[S])(implicit monad: Monad[M]): M[S]
The caller must ensure that the Iterable is immutable
- def foldLeftM[M[_], S, A](initialState: S, iter: Iterator[A])(step: (S, A) => M[S])(implicit monad: Monad[M]): M[S]
The caller must ensure that the underlying data structure of the iterator is immutable
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- 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() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def repeatFlatmap[M[_], A](m: M[A], f: (A) => M[A], counter: Int)(implicit monad: Monad[M]): M[A]
Repeatedly apply the same function to a monadic value
m
.Repeatedly apply the same function to a monadic value
m
. This can be used to retry until the limitcounter
is reached or the monadm
aborts.- Annotations
- @tailrec()
- def sequentialTraverse[X, M[_], S](xs: Seq[X])(f: (X) => M[S])(implicit monad: Monad[M]): M[Seq[S]]
- def sequentialTraverseMonoid[M[_], A, B](xs: Iterable[A])(step: (A) => M[B])(implicit monad: Monad[M], monoid: Monoid[B]): M[B]
Conceptually equivalent to
sequentialTraverse(xs)(step).map(monoid.combineAll)
.Conceptually equivalent to
sequentialTraverse(xs)(step).map(monoid.combineAll)
. The caller must ensure that the Iterable is immutable. - def sequentialTraverse_[M[_], A](xs: Iterator[A])(step: (A) => M[_])(implicit monad: Monad[M]): M[Unit]
The caller must ensure that the underlying data structure of the iterator is immutable
- def sequentialTraverse_[M[_], A](xs: Iterable[A])(step: (A) => M[_])(implicit monad: Monad[M]): M[Unit]
The implementation of
traverse
incats
is parallel, so this provides a sequential alternative.The implementation of
traverse
incats
is parallel, so this provides a sequential alternative. The caller must ensure that the Iterable is immutable - 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])