syntax

org.specs2.fp.`package`.syntax

Attributes

Graph
Supertypes
trait Identityx
trait EitherSyntax
trait ShowSyntax
trait MonadSyntax
class Object
trait Matchable
class Any
Show all
Self type
syntax.type

Members list

Type members

Inherited classlikes

implicit class MonadFlattenOps[F[_], A](fa: F[F[A]])(using evidence$1: Monad[F])

Attributes

Inherited from:
MonadSyntax
Supertypes
class Object
trait Matchable
class Any
implicit class MonadOps[F[_], A, B](fa: F[A])(using evidence$1: Monad[F])

Attributes

Inherited from:
MonadSyntax
Supertypes
class Object
trait Matchable
class Any

Value members

Inherited methods

def unless[F[_], A](condition: Boolean)(fa: => F[A])(using evidence$1: Applicative[F]): F[Unit]

Attributes

Inherited from:
ApplicativeSyntax
def when[F[_], A](condition: Boolean)(fa: => F[A])(using evidence$1: Applicative[F]): F[Unit]

Attributes

Inherited from:
ApplicativeSyntax

Extensions

Inherited extensions

extension [A](a: A)(using evidence$1: Show[A])
def show: String

Attributes

Inherited from:
ShowSyntax
extension [M](a: M)(using evidence$1: Semigroup[M])
def append(b: => M): M

Attributes

Inherited from:
SemigroupSyntax
def |+|(b: => M): M

Attributes

Inherited from:
SemigroupSyntax
extension [A, B](eab: Either[A, B])
def exists(f: B => Boolean): Boolean

Attributes

Inherited from:
EitherSyntax
def forall(f: B => Boolean): Boolean

Attributes

Inherited from:
EitherSyntax
def foreach(f: B => Unit): Unit

Attributes

Inherited from:
EitherSyntax
def toList: List[B]

Attributes

Inherited from:
EitherSyntax
def toOption: Option[B]

Attributes

Inherited from:
EitherSyntax
extension [A, B, AA >: A, BB >: B, C](eab: Either[A, B])
def ap(that: Either[AA, BB => C]): Either[AA, C]

Attributes

Inherited from:
EitherSyntax
def append(that: Either[AA, BB])(using BB: Semigroup[BB]): Either[AA, BB]

Attributes

Inherited from:
EitherSyntax
def as(c: => C): Either[A, C]

Attributes

Inherited from:
EitherSyntax
def ensure(onFailure: => AA)(f: B => Boolean): Either[AA, B]

Attributes

Inherited from:
EitherSyntax
def flatMap(f: B => Either[AA, C]): Either[AA, C]

Attributes

Inherited from:
EitherSyntax
def foldLeft(c: C)(f: (C, B) => C): C

Attributes

Inherited from:
EitherSyntax
def getOrElse(default: => BB): BB

Attributes

Inherited from:
EitherSyntax
def leftMap(f: A => C): Either[C, B]

Attributes

Inherited from:
EitherSyntax
def map(f: B => C): Either[A, C]

Attributes

Inherited from:
EitherSyntax
def orElse(fallback: => Either[C, BB]): Either[C, BB]

Attributes

Inherited from:
EitherSyntax
def recover(pf: PartialFunction[A, BB]): Either[A, BB]

Attributes

Inherited from:
EitherSyntax
def recoverWith(pf: PartialFunction[A, Either[AA, BB]]): Either[AA, BB]

Attributes

Inherited from:
EitherSyntax
def show(using AA: Show[AA], BB: Show[BB]): String

Attributes

Inherited from:
EitherSyntax
def toTry(using ev: A <:< Throwable): Try[B]

Attributes

Inherited from:
EitherSyntax
def valueOr(f: A => BB): BB

Attributes

Inherited from:
EitherSyntax
extension [A, B, C, D](eab: Either[A, B])
def bimap(fa: A => C, fb: B => D): Either[C, D]

Attributes

Inherited from:
EitherSyntax
extension [F[_], A, B, AA >: A, C](eab: Either[A, B])
def traverse(f: B => F[C])(using F: Applicative[F]): F[Either[AA, C]]

Attributes

Inherited from:
EitherSyntax
extension [F[_], A, B](fa: F[A])(using evidence$1: Functor[F])
infix def as(b: => B): F[B]

Attributes

Inherited from:
FunctorSyntax
infix def map(f: A => B): F[B]

Attributes

Inherited from:
FunctorSyntax
extension [F[_], A](fa: F[A])(using evidence$1: Functor[F])
def void: F[Unit]

Attributes

Inherited from:
FunctorSyntax
extension [F[_], A, G[_], B](fa: F[A])(using evidence$1: Traverse[F], evidence$2: Applicative[G])
def traverse(f: A => G[B]): G[F[B]]

Attributes

Inherited from:
TraverseSyntax
extension [F[_], G[_], A](fa: F[G[A]])(using evidence$1: Traverse[F], evidence$2: Applicative[G])
def sequence: G[F[A]]

Attributes

Inherited from:
TraverseSyntax
extension [F[_], A](fa: F[A])(using evidence$1: Foldable[F])
def toList: List[A]

Attributes

Inherited from:
FoldableSyntax
extension [F[_], A](fa: F[A])(using evidence$1: Foldable[F], evidence$2: Monoid[A])
def suml: A

Attributes

Inherited from:
FoldableSyntax
def sumr: A

Attributes

Inherited from:
FoldableSyntax
extension [F[_], M[_], A, B](fa: F[A])(using evidence$1: Foldable[F], evidence$2: Applicative[M])
def traverse_(f: A => M[B]): M[Unit]

Attributes

Inherited from:
FoldableSyntax
extension [A, B, F[_], M[_]](fa: F[A])(using evidence$1: Foldable[F], evidence$2: Monad[M])
def foldLeftM(z: B)(f: (B, A) => M[B]): M[B]

Attributes

Inherited from:
FoldableSyntax
def foldRightM(z: B)(f: (A, => B) => M[B]): M[B]

Attributes

Inherited from:
FoldableSyntax
extension [F[_], A, B](fa: F[A])(using evidence$1: Foldable[F], Monoid[B])
def foldMap(f: A => B): B

Attributes

Inherited from:
FoldableSyntax
extension [F[_], A, B](fa: F[A])(using evidence$1: Foldable[F])
def foldLeft(z: B)(f: (B, A) => B): B

Attributes

Inherited from:
FoldableSyntax
extension [F[_], A](fa: F[A])(using evidence$1: Foldable[F], evidence$2: Monoid[A])
def sumAll: A

Attributes

Inherited from:
FoldableSyntax
extension [F[_], A, B, C](fa: F[A])(using evidence$1: Applicative[F])
def |@|(fb: F[B])(f: (A, B) => C): F[C]

Attributes

Inherited from:
ApplicativeSyntax
extension [F[_], A, B](fa: F[A])(using evidence$1: Applicative[F])
def *>(fb: F[B]): F[B]

Attributes

Inherited from:
ApplicativeSyntax
def ap(f: F[A => B]): F[B]

Attributes

Inherited from:
ApplicativeSyntax
def tuple2(fb: F[B]): F[(A, B)]

Attributes

Inherited from:
ApplicativeSyntax
extension [F[_], A](fa: F[A])(using evidence$1: Applicative[F])
def unless(condition: Boolean): F[Unit]

Attributes

Inherited from:
ApplicativeSyntax
def when(condition: Boolean): F[Unit]

Attributes

Inherited from:
ApplicativeSyntax
extension [F[_], A](fa: List[A])(using evidence$1: Applicative[F])
def filterM(f: A => F[Boolean]): F[List[A]]

Attributes

Inherited from:
ApplicativeSyntax
extension [T](t: => T)
def orWhen(condition: Boolean)(f: T => T): T

These extension methods provide the possibility to execute a function on an object if a condition is true If not, the object is returned

These extension methods provide the possibility to execute a function on an object if a condition is true If not, the object is returned

Attributes

Inherited from:
Identityx
extension [S <: T, T](t: => S)(using evidence$1: Monoid[T])
def orEmptyUnless(condition: Boolean): T

Attributes

Inherited from:
Identityx
def orEmptyWhen(condition: Boolean): T

Attributes

Inherited from:
Identityx

Implicits

Inherited implicits

final implicit def MonadFlattenOps[F[_], A](fa: F[F[A]])(using evidence$1: Monad[F]): MonadFlattenOps[F, A]

Attributes

Inherited from:
MonadSyntax
final implicit def MonadOps[F[_], A, B](fa: F[A])(using evidence$1: Monad[F]): MonadOps[F, A, B]

Attributes

Inherited from:
MonadSyntax