269件ヒット
[201-269件を表示]
(0.222秒)
ライブラリ
- ビルトイン (269)
キーワード
- chunk (22)
- collect (11)
- drop (11)
-
drop
_ while (11) - filter (6)
-
filter
_ map (5) -
find
_ all (11) - force (11)
- grep (11)
-
grep
_ v (9) - map (11)
- reject (11)
- select (11)
-
slice
_ after (20) -
slice
_ before (33) -
slice
_ when (10) -
take
_ while (22) -
with
_ index (10) - zip (22)
検索結果
先頭5件
- Enumerator
:: Lazy # slice _ before {|elt| bool } -> Enumerator :: Lazy - Enumerator
:: Lazy # slice _ before(initial _ state) {|elt , state| bool } -> Enumerator :: Lazy - Enumerator
:: Lazy # slice _ before(pattern) -> Enumerator :: Lazy - Enumerator
:: Lazy # slice _ when {|elt _ before , elt _ after| bool } -> Enumerator :: Lazy - Enumerator
:: Lazy # with _ index(offset = 0) -> Enumerator :: Lazy
-
Enumerator
:: Lazy # slice _ before {|elt| bool } -> Enumerator :: Lazy (8008.0) -
Enumerable#slice_before と同じですが、配列ではなく Enumerator::Lazy を返します。
...ですが、配列ではなく Enumerator::Lazy を返します。
//emlist[例][ruby]{
1.step.lazy.slice_before { |e| e.even? }
# => #<Enumerator::Lazy: #<Enumerator: #<Enumerator::Generator:0x00007f9f31844ce8>:each>>
1.step.lazy.slice_before { |e| e % 3 == 0 }.take(5).force
# => [[1, 2], [3, 4,... -
Enumerator
:: Lazy # slice _ before(initial _ state) {|elt , state| bool } -> Enumerator :: Lazy (8008.0) -
Enumerable#slice_before と同じですが、配列ではなく Enumerator::Lazy を返します。
...ですが、配列ではなく Enumerator::Lazy を返します。
//emlist[例][ruby]{
1.step.lazy.slice_before { |e| e.even? }
# => #<Enumerator::Lazy: #<Enumerator: #<Enumerator::Generator:0x00007f9f31844ce8>:each>>
1.step.lazy.slice_before { |e| e % 3 == 0 }.take(5).force
# => [[1, 2], [3, 4,... -
Enumerator
:: Lazy # slice _ before(pattern) -> Enumerator :: Lazy (8008.0) -
Enumerable#slice_before と同じですが、配列ではなく Enumerator::Lazy を返します。
...ですが、配列ではなく Enumerator::Lazy を返します。
//emlist[例][ruby]{
1.step.lazy.slice_before { |e| e.even? }
# => #<Enumerator::Lazy: #<Enumerator: #<Enumerator::Generator:0x00007f9f31844ce8>:each>>
1.step.lazy.slice_before { |e| e % 3 == 0 }.take(5).force
# => [[1, 2], [3, 4,... -
Enumerator
:: Lazy # slice _ when {|elt _ before , elt _ after| bool } -> Enumerator :: Lazy (8008.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],... -
Enumerator
:: Lazy # with _ index(offset = 0) -> Enumerator :: Lazy (8008.0) -
生成時のパラメータに従って、要素にインデックスを添えて繰り返します。 インデックスは offset から始まります。
...クスは offset から始まります。
ブロックを指定した場合の戻り値は生成時に指定したレシーバ自身です。
//emlist[][ruby]{
("a"..).lazy.with_index(1) { |it, index| puts "#{index}:#{it}" }.take(3).force
# => 1:a
# 2:b
# 3:c
//}
@see Enumerator#with_index... -
Enumerator
:: Lazy # with _ index(offset = 0) {|(*args) , idx| . . . } -> Enumerator :: Lazy (8008.0) -
生成時のパラメータに従って、要素にインデックスを添えて繰り返します。 インデックスは offset から始まります。
...クスは offset から始まります。
ブロックを指定した場合の戻り値は生成時に指定したレシーバ自身です。
//emlist[][ruby]{
("a"..).lazy.with_index(1) { |it, index| puts "#{index}:#{it}" }.take(3).force
# => 1:a
# 2:b
# 3:c
//}
@see Enumerator#with_index... -
Enumerator
:: Lazy # zip(*lists) -> Enumerator :: Lazy (8008.0) -
Enumerable#zip と同じですが、配列ではなくEnumerator::Lazy を返します。
...配列ではなくEnumerator::Lazy を返します。
ただし一貫性のため、ブロック付きで呼び出した場合は Enumerable#zip と
同じ挙動になります。
//emlist[例][ruby]{
1.step.lazy.zip(('a'..'z').cycle)
# => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1:st......ep>>: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 (8008.0) -
Enumerable#zip と同じですが、配列ではなくEnumerator::Lazy を返します。
...配列ではなくEnumerator::Lazy を返します。
ただし一貫性のため、ブロック付きで呼び出した場合は Enumerable#zip と
同じ挙動になります。
//emlist[例][ruby]{
1.step.lazy.zip(('a'..'z').cycle)
# => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1:st......ep>>: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...