mll 2.6.3 → 2.6.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/TODO.md +4 -0
- data/lib/mll.rb +3 -2
- 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: cdc719bb37902a2786005667e0dab63b6417644c
|
4
|
+
data.tar.gz: c4a5814b341652d52c1ead02c01f1d806c2fd37a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba71d5acf438cf4e336a7830d010207fe7cb89f32fc6e4bbd94cdf3b9e2409aed4eb08fead4618faa193af9e45af56b85d07be30b92fb5fcf845a02dfb5f7157
|
7
|
+
data.tar.gz: 66b7a7d004938488ee4e7e21c97bb820978eeeae1d3ae4ba94e5de771a025dfbe307b2fe933ca9ef14a9b3b064ec50070d428764dce1dfdc04db098151259d6b
|
data/TODO.md
CHANGED
@@ -8,6 +8,10 @@ module MLL
|
|
8
8
|
enumerator = Enumerator.new do |e|
|
9
9
|
while list.all?{ |i| i.respond_to? :each } &&
|
10
10
|
# TODO refactor into depth-first yielding
|
11
|
+
def nest_while_list
|
12
|
+
lambda do |expr, f, test|
|
13
|
+
Enumerator.new do |e|
|
14
|
+
# TODO test on this drunk Symbol thing
|
11
15
|
def fold_list
|
12
16
|
lambda do |x, list, f = nil|
|
13
17
|
# TODO use Ruby#inject ?
|
data/lib/mll.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module MLL
|
2
2
|
|
3
|
-
VERSION = "2.6.
|
3
|
+
VERSION = "2.6.4"
|
4
4
|
|
5
5
|
class << self
|
6
6
|
|
@@ -62,7 +62,8 @@ module MLL
|
|
62
62
|
lambda do |expr, f, test|
|
63
63
|
Enumerator.new do |e|
|
64
64
|
e << expr
|
65
|
-
e << expr = f.call(expr) while test.
|
65
|
+
e << expr = (f.is_a?(Symbol) ? expr.send(f) : f.call(expr)) while (test.is_a?(Symbol) ? expr.send(test) : test.call(expr))
|
66
|
+
# TODO test on this drunk Symbol thing
|
66
67
|
end
|
67
68
|
end
|
68
69
|
end
|