るりまサーチ (Ruby 2.3.0)

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

別のキーワード

  1. psych psych_y
  2. psych y
  3. kernel psych_y
  4. kernel y
  5. y syck

ライブラリ

クラス

検索結果

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

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

Enumerable#slice_when と同じですが、配列ではなく 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]...