るりまサーチ

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

別のキーワード

  1. _builtin take_while
  2. _builtin take
  3. tuple take
  4. lazy take_while
  5. array take_while

ライブラリ

モジュール

キーワード

検索結果

<< < ... 3 4 5 >>

Enumerator::Lazy#zip(*lists) -> Enumerator::Lazy (7.0)

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

...uby]{
1.step.lazy.zip(('a'..'z').cycle)
# => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1:step>>:zip(#<Enumerator: "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...

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

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

...uby]{
1.step.lazy.zip(('a'..'z').cycle)
# => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1:step>>:zip(#<Enumerator: "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...
<< < ... 3 4 5 >>