functions 0.0.6 → 0.0.7

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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NWVhOTY5YzljODFlYjlkZmUxOGNkMzYzMmIwYmFkYWVlMDk0OTNlMA==
4
+ ZTA3YWEwZTYwYTVhY2FhOTRmMjJkMjBlMTQ5YzZmMmQ1MzMzZjNmYg==
5
5
  data.tar.gz: !binary |-
6
- Y2EwZTU4NGU4Yzg5NDlhMDMzNWYzOTYzNzBkMDE4YjQzNmU0MzIxZA==
6
+ MGFmMThjZWI2ZDEzNGJmNzE4NDVlYzI1ZWYzYjhlMzdjNDE5MDkwYw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NWZjMDI4NTc3MzMyN2UyNTZmN2E3ZDUxNWU5YmVhNTYyYjdjZTgxNzE0ZWE3
10
- NWY1OTg4MTliOTZmMmU3MzNjODcxNGM4Y2Y4MWZhZTQ1NDFlMjY0ZTQxZDVi
11
- YTU3OTg5NjM2MWU4MTU4NWQxYTFhZGZlNWVlZWVjYTliNzc1MTA=
9
+ NzJjZDAwMTM0NjkzZThkNzVmMmJhNGUwODRlNTk2MTFmNTRmNjU3NWEwMjcy
10
+ YTQ5ZDNiMjhhMWMzMThkMDg5NDljMzZiN2JiOWMyYWM0ZWE5YzdjYzNjZjNh
11
+ MjQ2MDk4ZjliMTU2Nzc3MDIxYzczYWU2NzgwNTE2YzdjYjM0ZGQ=
12
12
  data.tar.gz: !binary |-
13
- OTFhZjQ0ZDJhMjBmMjA1ZDVkOTE2NzYzNmRhZWM2NGZjMGRlOGUyYzZiYTYx
14
- MTY4NTJmYmQ2OWFmMzRkNGFlMjE3MzU1YmFjMWJhMGM4ODcxYTljZDE3NmUw
15
- OWI2OTk1NDMwNzEwYzBhNjBmYjA3ZjNiMzBjZWMzNjc5MmQ4OTk=
13
+ M2UwMWRlN2M5NmE5ODc0NDkxZjBhNzYxMTZlMjE3MDZmNzRmMWFlN2M5NTY3
14
+ ZDc1Y2ViNWZmNjIwOWIxM2U1N2VmYWMwM2VhNWNjMWIxNGJhOGEwYjFlNGRl
15
+ YjgzOWZkNDY2YzY0YzU2ZTJhMjNiYTZjMWQ5NTZkZTZiMTQ4MzU=
@@ -95,14 +95,14 @@ module Functions
95
95
 
96
96
  Group = ->(f,a) { a.group_by(&f) }.curry # functional friend
97
97
 
98
- Partition = ->(f) { Group.(f) >= Send.(:values) } # functional friend
98
+ Partition = ->(f) { Group.(f) < Send.(:values) } # functional friend
99
99
 
100
100
  FromTo = ->(from) { ->(to) { Range.new(from, to) } }
101
101
 
102
102
  FromOneTo = FromTo.(1)
103
103
 
104
104
  Count_By = ->(f,a) { a.inject( Hash.new(0) ) { |h,e| h[f.(e)] += 1; h } }.curry
105
- # count_by = ->(f) { group_by.( f ) >= map_hash.( send.(:length) ) }
105
+ # count_by = ->(f) { group_by.( f ) < map_hash.( send.(:length) ) }
106
106
 
107
107
  Count = ->(a) { a.inject( Hash.new(0) ) { |h,e| h[e] += 1; h } } # probably a bit faster
108
108
  # count = count_by.(identity) # alternative definition (generic)
@@ -1,3 +1,3 @@
1
1
  module Functions
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: functions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Koen Handekyn