Module: Deterministic
- Defined in:
- lib/deterministic.rb,
lib/deterministic/match.rb,
lib/deterministic/monad.rb,
lib/deterministic/either.rb,
lib/deterministic/option.rb,
lib/deterministic/result.rb,
lib/deterministic/version.rb,
lib/deterministic/core_ext/result.rb
Defined Under Namespace
Modules: CoreExt, Monad, PatternMatching
Classes: Either, Option, Result
Constant Summary
collapse
- None =
Deterministic::Option::None.new
- VERSION =
"0.13.1"
Class Method Summary
collapse
Class Method Details
.Failure(value) ⇒ Object
114
115
116
|
# File 'lib/deterministic/result.rb', line 114
def Failure(value)
Result::Failure.new(value)
end
|
.Left(value) ⇒ Object
28
29
30
|
# File 'lib/deterministic/either.rb', line 28
def Left(value)
Either.new(Array[value], [])
end
|
.Right(value) ⇒ Object
32
33
34
|
# File 'lib/deterministic/either.rb', line 32
def Right(value)
Either.new([], Array[value])
end
|
.Some(value) ⇒ Object
106
107
108
|
# File 'lib/deterministic/option.rb', line 106
def Some(value)
Option::Some.new(value)
end
|
.Success(value) ⇒ Object
110
111
112
|
# File 'lib/deterministic/result.rb', line 110
def Success(value)
Result::Success.new(value)
end
|