implicit class Syntax[F[_], A] extends AnyRef
provides object-oriented forwarders for Effect
methods. if you have something like this:
implicit val effect: Effect[F] = ... val fa: F[A] = ... val f: A => B = ...
you can now say:
import longevity.effect.Effect.Syntax val fb: F[B] = fa.map(f)
instead of:
val fb: F[B] = effect.map(fa)(f)
- Source
- Effect.scala
- Alphabetic
- By Inheritance
- Syntax
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
- def +(other: String): String
- def ->[B](y: B): (Syntax[F, A], B)
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
- def ensuring(cond: (Syntax[F, A]) ⇒ Boolean, msg: ⇒ Any): Syntax[F, A]
- def ensuring(cond: (Syntax[F, A]) ⇒ Boolean): Syntax[F, A]
- def ensuring(cond: Boolean, msg: ⇒ Any): Syntax[F, A]
- def ensuring(cond: Boolean): Syntax[F, A]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
flatMap[B](f: (A) ⇒ F[B]): F[B]
flatMap an
F[A]
to anF[B]
according to functionf
with typeA => F[B]
- def formatted(fmtstr: String): String
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
map[B](f: (A) ⇒ B): F[B]
map an
F[A]
to anF[B]
according to functionf
with typeA => B
-
def
mapBlocking[B](f: (A) ⇒ B): F[B]
map an
F[A]
to anF[B]
, using whatever means the effect has to perform potentially blocking operations.map an
F[A]
to anF[B]
, using whatever means the effect has to perform potentially blocking operations. for example, the effect may choose to perform the operation in a worker thread -
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
run: A
execute the effects and produce a result.
execute the effects and produce a result. this is only used in the test frameworks, which need to execute effects to check the result
- See also
longevity.test
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
- def →[B](y: B): (Syntax[F, A], B)