Package com.github.skopylov58.functional
Interface State<T,S>
- Type Parameters:
T- value typeS- state type
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
State monad.
-
Method Details
-
apply
State monad is just function S -> (T, S)- Parameters:
state-- Returns:
-
pure
Creates state monad from pure value- Type Parameters:
T- value typeS- state type- Parameters:
t- value- Returns:
- state monad
-
map
-
flatMap
-