arrows 0.0.9 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/arrows.rb +9 -1
- data/lib/arrows/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: 916db985e89323cd1552c30dd79ae2719a47ac85
|
|
4
|
+
data.tar.gz: 8d054824c4ee151d159b77820a79d986664ae471
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7e7053ab95849b37a6c42647a5ae5d59dd3d63cbd3f312640c82905704252931018e43222c2f6a82cc4866576656a980a18f5a41debb10138d762b3a9c8466c7
|
|
7
|
+
data.tar.gz: 0f5db905a5242fd0e9cbab0ce57f431a19bb4f8ea22a63c6ad58c0a18132504023bbac9727eac080930a7de819b7e4d4da79abacca7bf6e544e39b9994efb6d1
|
data/lib/arrows.rb
CHANGED
|
@@ -37,7 +37,13 @@ module Arrows
|
|
|
37
37
|
Arrows::Proc.new { |args| x }
|
|
38
38
|
end
|
|
39
39
|
def arrow_like?(x)
|
|
40
|
-
proc_like?(x) &&
|
|
40
|
+
proc_like?(x) &&
|
|
41
|
+
x.arity == 1 &&
|
|
42
|
+
x.respond_to?(:>=) &&
|
|
43
|
+
x.respond_to?(:>>) &&
|
|
44
|
+
x.respond_to?(:^) &&
|
|
45
|
+
x.respond_to?(:/) &&
|
|
46
|
+
x.respond_to?(:%)
|
|
41
47
|
end
|
|
42
48
|
def proc_like?(x)
|
|
43
49
|
x.respond_to?(:call) && x.respond_to?(:arity)
|
|
@@ -49,4 +55,6 @@ module Arrows
|
|
|
49
55
|
end
|
|
50
56
|
end
|
|
51
57
|
ID = lift -> (x) { x }
|
|
58
|
+
Good = lift -> (x) { good x }
|
|
59
|
+
Evil = lift -> (x) { evil x }
|
|
52
60
|
end
|
data/lib/arrows/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: arrows
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.10
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Thomas Chen
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-12-
|
|
11
|
+
date: 2014-12-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|