funcify 0.4.25 → 0.4.26

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0420107038bad57cdfd421e108fe0ac3f1f0c9ecddceb3c676dc717ac11e44f3'
4
- data.tar.gz: cd7ab73950ec24788764d1df712404a6a3427e835118ca8c4b3e8a2f6760f046
3
+ metadata.gz: 3a802d419c55532be00bd3aac6491b5ae824cf95dfee083a4ded89db6d5c3278
4
+ data.tar.gz: 909ce08211e7fb483a008c70c7f9801c9801254a9b0d0fb985b105d813d3d67f
5
5
  SHA512:
6
- metadata.gz: bde0dcf1bb42b99556dc906bb52a39a0de80eec7022c603a5cf0a5e145244992f01b5e6dcbb3cb4a49ff3111ac95b467faed0d8d840ec01877df815043212d29
7
- data.tar.gz: 3e909ed15b8ee35ad3eb55e7486c6f3643cb890bb90aa62f9255a853e0504c9c9b9f2da0f096b1eea0c7f2b3a6e7c98b8c63b7312cfdacd89f57768dc43cfc62
6
+ metadata.gz: 6c4dfdfd1c48f01279da4888bcc6eb65587c3f8740b0a10731b76fb5012ff8bddaa45e9fbbca32822ea8a31ff26cf0c4b8d82d72043db19d974e667ad046b683
7
+ data.tar.gz: e2f0bf5f99c94eea576b576e59c187329285180c6993c15c08359da23a3186e0088e1865ef7fd71337ef3847800aa5dc30d1857993ccbdad644b399b42fb92e3
data/Gemfile.lock CHANGED
@@ -1,16 +1,16 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- funcify (0.4.24)
4
+ funcify (0.4.25)
5
5
  dry-monads (~> 1.0)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
10
  coderay (1.1.2)
11
- concurrent-ruby (1.1.6)
11
+ concurrent-ruby (1.1.8)
12
12
  diff-lcs (1.3)
13
- dry-core (0.4.9)
13
+ dry-core (0.5.0)
14
14
  concurrent-ruby (~> 1.0)
15
15
  dry-equalizer (0.3.0)
16
16
  dry-monads (1.3.5)
data/lib/funcify/fn.rb CHANGED
@@ -152,7 +152,7 @@ module Funcify
152
152
  -> success_fn, test_fns, value {
153
153
  Fn.compose.(
154
154
  success_fn.(Fn.identity), # provide a results extractor fn to the success_fn
155
- Fn.map.(-> test_fn { test_fn.(value) } ), # call each test fn with the context
155
+ Fn.map.(-> test_fn { test_fn.(value) } ) # call each test fn with the context
156
156
  ).(test_fns)
157
157
  }.curry
158
158
  end
data/lib/funcify/map.rb CHANGED
@@ -27,6 +27,11 @@ module Funcify
27
27
  -> f, ms { ms.select {|k,v| f.(k,v) } }.curry
28
28
  end
29
29
 
30
+ def find
31
+ -> f, ms { ms.find {|k,v| f.(k,v) } }.curry
32
+ end
33
+
34
+
30
35
  def equality
31
36
  -> field, test_value, i {
32
37
  if field.kind_of?(Proc)
@@ -1,3 +1,3 @@
1
1
  module Funcify
2
- VERSION = "0.4.25"
2
+ VERSION = "0.4.26"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: funcify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.25
4
+ version: 0.4.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Col Perks
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-04-18 00:00:00.000000000 Z
11
+ date: 2021-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-monads