deterministic 0.14.0 → 0.14.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/HISTORY.md +4 -0
- data/lib/deterministic/result.rb +2 -2
- data/lib/deterministic/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 168526a86344e4c8cbab6c7a61cc5d498db3d404
|
4
|
+
data.tar.gz: cdfa647cd679132878d0deab9cbae65a1c8a9ecd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4280111607d96258055bef389cc7f2c046ed3fe09f3762467b55e3b14ed63257fe43453aef46a28615bfd19b65c882bffe160cb4cd97c3d613f67ae028cd2df
|
7
|
+
data.tar.gz: ca9701d45bf4682a57b33ac9b323aba4381db78ba52b3b67c8e838dc7b001056a177a3f33c843adc265019f9439fbc8e82a216f904a51ccc241fd69219df272a
|
data/HISTORY.md
CHANGED
data/lib/deterministic/result.rb
CHANGED
@@ -90,8 +90,8 @@ module Deterministic
|
|
90
90
|
def +(other)
|
91
91
|
raise Deterministic::Monad::NotMonadError, "Expected #{other.inspect} to be an Result" unless other.is_a? Result
|
92
92
|
match {
|
93
|
-
success ->
|
94
|
-
failure ->
|
93
|
+
success ->(_) { other.success? } { |s| Result::Success.new(s + other.value)}
|
94
|
+
failure ->(_) { other.failure? } { |f| Result::Failure.new(f + other.value)}
|
95
95
|
success { other } # implied other.failure?
|
96
96
|
failure { self } # implied other.success?
|
97
97
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deterministic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.14.
|
4
|
+
version: 0.14.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Zolnierek
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-09-
|
11
|
+
date: 2014-09-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|