final class FlatMapOps[F[_], A] extends AnyVal
- Alphabetic
- By Inheritance
- FlatMapOps
- AnyVal
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new FlatMapOps(fa: F[A])
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
##(): Int
- Definition Classes
- Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- Any
-
def
>>[B](fb: ⇒ F[B])(implicit F: FlatMap[F]): F[B]
Alias for
fa.flatMap(_ => fb)
.Alias for
fa.flatMap(_ => fb)
.Unlike
*>
,fb
is defined as a by-name parameter, allowing this method to be used in cases where computingfb
is not stack safe unless suspended in aflatMap
. -
def
>>=[B](f: (A) ⇒ F[B])(implicit F: FlatMap[F]): F[B]
Alias for flatMap.
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
foreverM[B](implicit F: FlatMap[F]): F[B]
Like an infinite loop of >> calls.
Like an infinite loop of >> calls. This is most useful effect loops that you want to run forever in for instance a server.
This will be an infinite loop, or it will return an F[Nothing].
Be careful using this. For instance, a List of length k will produce a list of length k^n at iteration n. This means if k = 0, we return an empty list, if k = 1, we loop forever allocating single element lists, but if we have a k > 1, we will allocate exponentially increasing memory and very quickly OOM.
-
def
getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
toString(): String
- Definition Classes
- Any