com
.
twitter
.
algebird
.
monad
StateFn
Related Doc:
package monad
final
case class
StateFn
[
S
,
F
,
T
]
(
fn: (
S
) ⇒
Either
[
F
, (
S
,
T
)]
)
extends
StateWithError
[
S
,
F
,
T
] with
Product
with
Serializable
Simple wrapper of a function in the Monad
Linear Supertypes
Serializable
,
Serializable
,
Product
,
Equals
,
StateWithError
[
S
,
F
,
T
],
AnyRef
,
Any
Ordering
Alphabetic
By Inheritance
Inherited
StateFn
Serializable
Serializable
Product
Equals
StateWithError
AnyRef
Any
Hide All
Show All
Visibility
Public
All
Instance Constructors
new
StateFn
(
fn: (
S
) ⇒
Either
[
F
, (
S
,
T
)]
)
Value Members
final
def
!=
(
arg0:
Any
)
:
Boolean
Definition Classes
AnyRef → Any
final
def
##
()
:
Int
Definition Classes
AnyRef → Any
final
def
==
(
arg0:
Any
)
:
Boolean
Definition Classes
AnyRef → Any
def
apply
(
state:
S
)
:
Either
[
F
, (
S
,
T
)]
Definition Classes
StateWithError
final
def
asInstanceOf
[
T0
]
:
T0
Definition Classes
Any
def
clone
()
:
AnyRef
Attributes
protected[
java.lang
]
Definition Classes
AnyRef
Annotations
@throws
(
...
)
final
def
eq
(
arg0:
AnyRef
)
:
Boolean
Definition Classes
AnyRef
def
finalize
()
:
Unit
Attributes
protected[
java.lang
]
Definition Classes
AnyRef
Annotations
@throws
(
classOf[java.lang.Throwable]
)
def
flatMap
[
F1 >:
F
,
U
]
(
next: (
T
) ⇒
StateWithError
[
S
,
F1
,
U
]
)
:
StateWithError
[
S
,
F1
,
U
]
Definition Classes
StateWithError
val
fn
: (
S
) ⇒
Either
[
F
, (
S
,
T
)]
final
def
getClass
()
:
Class
[_]
Definition Classes
AnyRef → Any
final
def
isInstanceOf
[
T0
]
:
Boolean
Definition Classes
Any
def
join
[
F1 >:
F
,
U
]
(
that:
StateWithError
[
S
,
F1
,
U
]
)
(
implicit
sgf:
Semigroup
[
F1
]
,
sgs:
Semigroup
[
S
]
)
:
StateWithError
[
S
,
F1
, (
T
,
U
)]
Definition Classes
StateWithError
def
join
[
F1 >:
F
,
U
]
(
that:
StateWithError
[
S
,
F1
,
U
]
,
mergeErr: (
F1
,
F1
) ⇒
F1
,
mergeState: (
S
,
S
) ⇒
S
)
:
StateWithError
[
S
,
F1
, (
T
,
U
)]
Definition Classes
StateWithError
def
map
[
U
]
(
fn: (
T
) ⇒
U
)
:
StateWithError
[
S
,
F
,
U
]
Definition Classes
StateWithError
final
def
ne
(
arg0:
AnyRef
)
:
Boolean
Definition Classes
AnyRef
final
def
notify
()
:
Unit
Definition Classes
AnyRef
final
def
notifyAll
()
:
Unit
Definition Classes
AnyRef
def
run
(
state:
S
)
:
Either
[
F
, (
S
,
T
)]
Definition Classes
StateFn
→
StateWithError
final
def
synchronized
[
T0
]
(
arg0: ⇒
T0
)
:
T0
Definition Classes
AnyRef
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
@throws
(
...
)
Inherited from
Serializable
Inherited from
Serializable
Inherited from
Product
Inherited from
Equals
Inherited from
StateWithError
[
S
,
F
,
T
]
Inherited from
AnyRef
Inherited from
Any
Ungrouped
Simple wrapper of a function in the Monad