るりまサーチ

最速Rubyリファレンスマニュアル検索!
261件ヒット [201-261件を表示] (0.028秒)

別のキーワード

  1. _builtin step
  2. numeric step
  3. date step
  4. range step
  5. step

ライブラリ

クラス

キーワード

検索結果

<< < 1 2 3 >>

Enumerator::Lazy#chunk {|elt| ... } -> Enumerator::Lazy (6290.0)

Enumerable#chunk と同じですが、配列ではなく Enumerator::Lazy を返します。

...じですが、配列ではなく Enumerator::Lazy を返します。

//emlist[例][ruby]{
1.step.lazy.chunk{ |n| n % 3 == 0 }
# => #<Enumerator::Lazy: #<Enumerator: #<Enumerator::Generator:0x007f8bf18118f0>:each>>

1.step.lazy.chunk{ |n| n % 3 == 0 }.take(5).force
# => [[false, [1, 2]], [true, [3]...

Enumerator::Lazy#chunk(initial_state) {|elt, state| ... } -> Enumerator::Lazy (6290.0)

Enumerable#chunk と同じですが、配列ではなく Enumerator::Lazy を返します。

...じですが、配列ではなく Enumerator::Lazy を返します。

//emlist[例][ruby]{
1.step.lazy.chunk{ |n| n % 3 == 0 }
# => #<Enumerator::Lazy: #<Enumerator: #<Enumerator::Generator:0x007f8bf18118f0>:each>>

1.step.lazy.chunk{ |n| n % 3 == 0 }.take(5).force
# => [[false, [1, 2]], [true, [3]...

Enumerator::Lazy#slice_after {|elt| bool } -> Enumerator::Lazy (6290.0)

Enumerable#slice_after と同じですが、配列ではなく Enumerator::Lazy を返します。

...すが、配列ではなく Enumerator::Lazy を返します。

//emlist[例][ruby]{
1.step.lazy.slice_after { |e| e % 3 == 0 }
# => #<Enumerator::Lazy: #<Enumerator: #<Enumerator::Generator:0x007fd73980e6f8>:each>>

1.step.lazy.slice_after { |e| e % 3 == 0 }.take(5).force
# => [[1, 2, 3], [4, 5, 6...

Enumerator::Lazy#slice_after(pattern) -> Enumerator::Lazy (6290.0)

Enumerable#slice_after と同じですが、配列ではなく Enumerator::Lazy を返します。

...すが、配列ではなく Enumerator::Lazy を返します。

//emlist[例][ruby]{
1.step.lazy.slice_after { |e| e % 3 == 0 }
# => #<Enumerator::Lazy: #<Enumerator: #<Enumerator::Generator:0x007fd73980e6f8>:each>>

1.step.lazy.slice_after { |e| e % 3 == 0 }.take(5).force
# => [[1, 2, 3], [4, 5, 6...

Enumerator::Lazy#slice_when {|elt_before, elt_after| bool } -> Enumerator::Lazy (6288.0)

Enumerable#slice_when と同じですが、配列ではなく Enumerator::Lazy を返します。

...配列ではなく Enumerator::Lazy を返します。

//emlist[例][ruby]{
1.step.lazy.slice_when { |i, j| (i + j) % 5 == 0 }
# => #<Enumerator::Lazy: #<Enumerator: #<Enumerator::Generator:0x00007fce84118348>:each>>

1.step.lazy.slice_when { |i, j| (i + j) % 5 == 0 }.take(5).force
# => [[1, 2], [3...

絞り込み条件を変える

Enumerator::Lazy#zip(*lists) {|v1, v2, ...| ... } -> nil (6106.0)

Enumerable#zip と同じですが、配列ではなくEnumerator::Lazy を返します。

...なくEnumerator::Lazy を返します。

ただし一貫性のため、ブロック付きで呼び出した場合は Enumerable#zip と
同じ挙動になります。

//emlist[例][ruby]{
1.step.lazy.zip(('a'..'z').cycle)
# => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1:step>>:zip(#<E...
...numerator: "a".."z":cycle>)>

1.step.lazy.zip(('a'..'z').cycle).take(30).force.last(6)
# => [[25, "y"], [26, "z"], [27, "a"], [28, "b"], [29, "c"], [30, "d"]]
//}

@see Enumerable#zip...
<< < 1 2 3 >>