Package com.github.skopylov58.functional
Interface Reader<C,T>
- Type Parameters:
C- context typeT- value type
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Reader monad.
-
Method Details
-
run
Reader monad is just function C -> T where C is context, T is value- Parameters:
context-- Returns:
- value of type T
-
pure
Creates Reader monad from value of type T- Type Parameters:
C- context typeT- value type- Parameters:
t- value- Returns:
- Reader monad
-
map
-
flatMap
-