Packages

  • package root
    Definition Classes
    root
  • package longevity

    a persistence framework for Scala and NoSQL

    a persistence framework for Scala and NoSQL

    Definition Classes
    root
  • package effect

    contains the Effect type class and instances

    contains the Effect type class and instances

    Definition Classes
    longevity
  • object Effect

    contains implicit Effect implementations for common effectful classes

    contains implicit Effect implementations for common effectful classes

    Definition Classes
    effect
  • Syntax

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
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Syntax
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Syntax(fa: F[A])(implicit arg0: Effect[F])

Value Members

  1. def flatMap[B](f: (A) ⇒ F[B]): F[B]

    flatMap an F[A] to an F[B] according to function f with type A => F[B]

  2. def map[B](f: (A) ⇒ B): F[B]

    map an F[A] to an F[B] according to function f with type A => B

  3. def mapBlocking[B](f: (A) ⇒ B): F[B]

    map an F[A] to an F[B], using whatever means the effect has to perform potentially blocking operations.

    map an F[A] to an F[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

  4. 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