specs2-fp
specs2-fp
org.specs2.fp
Applicative
Applicative
futureApplicative
ApplicativeSyntax
EitherSyntax
Foldable
Foldable
given_Foldable_List
given_Foldable_Vector
given_Foldable_LazyList
FoldableSyntax
Functor
Functor
OptionFunctor
EitherFunctor
FunctorSyntax
FunctorSyntax
Identityx
Identityx
Memo
Memo
Monad
Monad
idMonad
optionMonad
eitherMonad
futureMonad
MonadSyntax
MonadOps
MonadFlattenOps
Monoid
Monoid
Name
Name
name
NaturalTransformation
NaturalTransformation
naturalId
Need
Need
Semigroup
Semigroup
SemigroupSyntax
Show
Show
ShowSyntax
Traverse
Traversal
Traverse
listInstance
optionInstance
eitherInstance
TraverseSyntax
TraverseSyntax
Tree
Tree
Node
Leaf
TreeLoc
TreeLoc
Value
syntax
specs2-fp
/
org.specs2.fp
/
EitherSyntax
EitherSyntax
trait
EitherSyntax
Inspired from the cats (
https://github.com/typelevel/cats
project
Graph
Supertypes
Known subtypes
class
Object
trait
Matchable
class
Any
object
syntax
Extensions
Extensions
Extensions
extension (eab:
Either
[
A
,
B
])
def
traverse
[F[_], A, B, AA >: A, C](f:
B
=>
F
[
C
])(using F:
Applicative
[
F
]): F[
Either
[AA, C]]
extension (eab:
Either
[
A
,
B
])
def
bimap
[A, B, C, D](fa:
A
=>
C
, fb:
B
=>
D
):
Either
[C, D]
extension (eab:
Either
[
A
,
B
])
def
ap
[A, B, AA >: A, BB >: B, C](that:
Either
[
AA
,
BB
=>
C
]):
Either
[AA, C]
def
append
[A, B, AA >: A, BB >: B, C](that:
Either
[
AA
,
BB
])(using BB:
Semigroup
[
BB
]):
Either
[AA, BB]
def
as
[A, B, AA >: A, BB >: B, C](c: =>
C
):
Either
[A, C]
def
ensure
[A, B, AA >: A, BB >: B, C](onFailure: =>
AA
)(f:
B
=>
Boolean
):
Either
[AA, B]
def
flatMap
[A, B, AA >: A, BB >: B, C](f:
B
=>
Either
[
AA
,
C
]):
Either
[AA, C]
def
foldLeft
[A, B, AA >: A, BB >: B, C](c:
C
)(f: (
C
,
B
) =>
C
): C
def
getOrElse
[A, B, AA >: A, BB >: B, C](default: =>
BB
): BB
def
leftMap
[A, B, AA >: A, BB >: B, C](f:
A
=>
C
):
Either
[C, B]
def
map
[A, B, AA >: A, BB >: B, C](f:
B
=>
C
):
Either
[A, C]
def
orElse
[A, B, AA >: A, BB >: B, C](fallback: =>
Either
[
C
,
BB
]):
Either
[C, BB]
def
recover
[A, B, AA >: A, BB >: B, C](pf:
PartialFunction
[
A
,
BB
]):
Either
[A, BB]
def
recoverWith
[A, B, AA >: A, BB >: B, C](pf:
PartialFunction
[
A
,
Either
[
AA
,
BB
]]):
Either
[AA, BB]
def
show
[A, B, AA >: A, BB >: B, C](using AA:
Show
[
AA
], BB:
Show
[
BB
]):
String
def
toTry
[A, B, AA >: A, BB >: B, C](using ev:
A
<:<
Throwable
):
Try
[B]
def
valueOr
[A, B, AA >: A, BB >: B, C](f:
A
=>
BB
): BB
extension (eab:
Either
[
A
,
B
])
def
exists
[A, B](f:
B
=>
Boolean
):
Boolean
def
forall
[A, B](f:
B
=>
Boolean
):
Boolean
def
foreach
[A, B](f:
B
=>
Unit
):
Unit
def
toList
[A, B]:
List
[B]
def
toOption
[A, B]:
Option
[B]