mll 2.6.3 → 2.6.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/TODO.md +4 -0
  3. data/lib/mll.rb +3 -2
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d37431f3cf10477e65f24dfee6b9076fb4969810
4
- data.tar.gz: 010efad274ba249ce67ec414748cd7dd356cb659
3
+ metadata.gz: cdc719bb37902a2786005667e0dab63b6417644c
4
+ data.tar.gz: c4a5814b341652d52c1ead02c01f1d806c2fd37a
5
5
  SHA512:
6
- metadata.gz: 8636fc22ee9cade5fe9eb39f88526872ed66714fc43fccb26afd169271baa122ce0844e95429402fcbf3a2c847e452f92a27f1e74451494a78546493625e25b8
7
- data.tar.gz: 10a02174cac7729d1c42cbe11a30e2fbe8f33b4d162a0ac3be084c669ec8d9df55601b854a34f8843a85fbf1971be954ba008bf5c0ef69541b1b335cb98993f0
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"
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.call expr
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mll
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.3
4
+ version: 2.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Maslov