ramda-ruby 0.2.2 → 0.2.3
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/CHANGELOG.md +7 -0
- data/ROADMAP.md +27 -32
- data/docs/FUNCTIONS.md +1 -0
- data/lib/ramda.rb +1 -0
- data/lib/ramda/list.rb +11 -0
- data/lib/ramda/version.rb +1 -1
- data/spec/ramda/list_spec.rb +6 -0
- data/spec/ramda_spec.rb +1 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 554c835670ffecb793b2f9219833f609fc7474cd
|
4
|
+
data.tar.gz: 58afbd319ba44b6fa58a0792ea817f342febbeba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2c06c63751263ce4e45b605f11a703c54c580c7da2d1761f2de822c933f39ff607b6ee941dd09ac8d77f18f4eb805d235952de9b0d57d3f206c72d29eb31404
|
7
|
+
data.tar.gz: 06b141ae4b5a1022cff6883797e33791993987bc8690981bc141ae2491c53c03572f52c2f796435e3005152c29b927d4634521809285da2da2d96675b2ae181f
|
data/CHANGELOG.md
CHANGED
data/ROADMAP.md
CHANGED
@@ -2,52 +2,47 @@
|
|
2
2
|
|
3
3
|
* Find out suitable documentation format
|
4
4
|
|
5
|
-
### release 0.2.3
|
6
|
-
|
7
|
-
times
|
8
|
-
|
9
5
|
### release 0.3.0
|
10
6
|
|
11
|
-
ap
|
12
|
-
chain
|
13
|
-
empty
|
14
|
-
from_pairs
|
15
|
-
is
|
16
|
-
length
|
17
|
-
math_mod
|
18
|
-
of
|
19
|
-
unnest
|
20
|
-
zip_obj
|
7
|
+
* ap
|
8
|
+
* chain
|
9
|
+
* empty
|
10
|
+
* from_pairs
|
11
|
+
* is
|
12
|
+
* length
|
13
|
+
* math_mod
|
14
|
+
* of
|
15
|
+
* unnest
|
16
|
+
* zip_obj
|
21
17
|
|
22
18
|
### release 0.4.0
|
23
19
|
|
24
|
-
construct_n
|
25
|
-
to_pairs
|
26
|
-
to_pairs_in
|
20
|
+
* construct_n
|
21
|
+
* to_pairs
|
22
|
+
* to_pairs_in
|
27
23
|
|
28
24
|
### release 0.4.2
|
29
25
|
|
30
|
-
converge
|
26
|
+
* converge
|
31
27
|
|
32
28
|
### release 0.5.0
|
33
29
|
|
34
|
-
curry_n
|
30
|
+
* curry_n
|
35
31
|
|
36
32
|
### release 0.6.0
|
37
33
|
|
38
|
-
__
|
39
|
-
bind
|
40
|
-
cond
|
41
|
-
prop_or
|
42
|
-
trim
|
34
|
+
* __
|
35
|
+
* bind
|
36
|
+
* cond
|
37
|
+
* prop_or
|
38
|
+
* trim
|
43
39
|
|
44
40
|
### release 0.7.0
|
45
41
|
|
46
|
-
apply
|
47
|
-
has
|
48
|
-
has_in
|
49
|
-
lift
|
50
|
-
lift_n
|
51
|
-
path_eq
|
52
|
-
replace
|
53
|
-
|
42
|
+
* apply
|
43
|
+
* has
|
44
|
+
* has_in
|
45
|
+
* lift
|
46
|
+
* lift_n
|
47
|
+
* path_eq
|
48
|
+
* replace
|
data/docs/FUNCTIONS.md
CHANGED
data/lib/ramda.rb
CHANGED
data/lib/ramda/list.rb
CHANGED
@@ -416,6 +416,17 @@ module Ramda
|
|
416
416
|
xs[0, xs.index { |x| !fn.call(x) } || xs.size]
|
417
417
|
end
|
418
418
|
|
419
|
+
# Calls an input function n times, returning an array containing the results
|
420
|
+
# of those function calls.
|
421
|
+
# fn is passed one argument: The current value of n, which begins at 0
|
422
|
+
# and is gradually incremented to n - 1.
|
423
|
+
#
|
424
|
+
# (Number -> a) -> Number -> [a]
|
425
|
+
#
|
426
|
+
curried_method(:times) do |fn, n|
|
427
|
+
n.times.to_a.map(&fn)
|
428
|
+
end
|
429
|
+
|
419
430
|
# Returns a new list containing only one copy of each element in the original list.
|
420
431
|
#
|
421
432
|
# [a] -> [a]
|
data/lib/ramda/version.rb
CHANGED
data/spec/ramda/list_spec.rb
CHANGED
@@ -453,6 +453,12 @@ describe Ramda::List do
|
|
453
453
|
end
|
454
454
|
end
|
455
455
|
|
456
|
+
context '#times' do
|
457
|
+
it 'from docs' do
|
458
|
+
expect(R.times(R.identity, 5)).to eq([0, 1, 2, 3, 4])
|
459
|
+
end
|
460
|
+
end
|
461
|
+
|
456
462
|
context '#uniq' do
|
457
463
|
it 'from docs' do
|
458
464
|
expect(r.uniq([1, 1, 2, 1])).to eq([1, 2])
|
data/spec/ramda_spec.rb
CHANGED