9件ヒット
[1-9件を表示]
(0.060秒)
種類
- インスタンスメソッド (6)
- モジュール関数 (1)
- 特異メソッド (1)
- クラス (1)
ライブラリ
- ビルトイン (9)
クラス
-
Enumerator
:: Lazy (4)
モジュール
- Enumerable (1)
- GC (2)
- ObjectSpace (1)
キーワード
-
collect
_ concat (1) -
flat
_ map (1) -
garbage
_ collect (2) - lazy (1)
- map (1)
- start (1)
検索結果
先頭5件
-
Enumerator
:: Lazy # collect {|item| . . . } -> Enumerator :: Lazy (87748.0) -
Enumerable#map と同じですが、配列ではなくEnumerator::Lazy を返します。
Enumerable#map と同じですが、配列ではなくEnumerator::Lazy を返します。
@raise ArgumentError ブロックを指定しなかった場合に発生します。
//emlist[例][ruby]{
1.step.lazy.map{ |n| n % 3 == 0 }
# => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1:step>>:map>
1.step.lazy.collect{ |n| n.succ }.take(10).force
# => [2, 3, 4, 5, 6, 7, 8,... -
Enumerator
:: Lazy (78181.0) -
map や select などのメソッドの遅延評価版を提供するためのクラス。
map や select などのメソッドの遅延評価版を提供するためのクラス。
動作は通常の Enumerator と同じですが、以下のメソッドが遅延評価を行う
(つまり、配列ではなく Enumerator を返す) ように再定義されています。
* map/collect
* flat_map/collect_concat
* filter_map
* select/find_all
* reject
* grep, grep_v
* take, take_while
* drop, drop_while
* slice_before, slice_after, slice... -
Enumerator
:: Lazy # collect _ concat {|item| . . . } -> Enumerator :: Lazy (51730.0) -
ブロックの実行結果をひとつに繋げたものに対してイテレートするような Enumerator::Lazy のインスタンスを返します。
ブロックの実行結果をひとつに繋げたものに対してイテレートするような
Enumerator::Lazy のインスタンスを返します。
//emlist[][ruby]{
["foo", "bar"].lazy.flat_map {|i| i.each_char.lazy}.force
#=> ["f", "o", "o", "b", "a", "r"]
//}
ブロックの返した値 x は、以下の場合にのみ分解され、連結されます。
* x が配列であるか、to_ary メソッドを持つとき
* x が each および force メソッドを持つ (例:Enumerator::Lazy) ... -
Enumerable
# lazy -> Enumerator :: Lazy (42781.0) -
自身を lazy な Enumerator に変換したものを返します。
自身を lazy な Enumerator に変換したものを返します。
この Enumerator は、以下のメソッドが遅延評価を行う (つまり、配列ではな
くEnumeratorを返す) ように再定義されています。
* map/collect
* flat_map/collect_concat
* select/find_all
* reject
* grep
* take, take_while
* drop, drop_while
* zip (※一貫性のため、ブロックを渡さないケースのみlazy)
* cycle (※一貫性のため、ブロックを渡さないケースのみl... -
Enumerator
:: Lazy # map {|item| . . . } -> Enumerator :: Lazy (42448.0) -
Enumerable#map と同じですが、配列ではなくEnumerator::Lazy を返します。
Enumerable#map と同じですが、配列ではなくEnumerator::Lazy を返します。
@raise ArgumentError ブロックを指定しなかった場合に発生します。
//emlist[例][ruby]{
1.step.lazy.map{ |n| n % 3 == 0 }
# => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1:step>>:map>
1.step.lazy.collect{ |n| n.succ }.take(10).force
# => [2, 3, 4, 5, 6, 7, 8,... -
Enumerator
:: Lazy # flat _ map {|item| . . . } -> Enumerator :: Lazy (42430.0) -
ブロックの実行結果をひとつに繋げたものに対してイテレートするような Enumerator::Lazy のインスタンスを返します。
ブロックの実行結果をひとつに繋げたものに対してイテレートするような
Enumerator::Lazy のインスタンスを返します。
//emlist[][ruby]{
["foo", "bar"].lazy.flat_map {|i| i.each_char.lazy}.force
#=> ["f", "o", "o", "b", "a", "r"]
//}
ブロックの返した値 x は、以下の場合にのみ分解され、連結されます。
* x が配列であるか、to_ary メソッドを持つとき
* x が each および force メソッドを持つ (例:Enumerator::Lazy) ... -
GC
# garbage _ collect(full _ mark: true , immediate _ sweep: true) -> nil (42358.0) -
ガーベージコレクトを開始します。
ガーベージコレクトを開始します。
GC.start や ObjectSpace.#garbage_collect と同じ働きをします。
GC.disable により GC が禁止されている場合でもガベージコレクトを開始します。
nil を返します。
@param full_mark マイナー GC を動作させる場合は false を、そうでない場
合は true を指定します。
@param immediate_sweep sweep を遅らせる(Lazy Sweep を行う)場合は false
を、そう... -
ObjectSpace
. # garbage _ collect(full _ mark: true , immediate _ sweep: true) -> nil (42322.0) -
どこからも参照されなくなったオブジェクトを回収します。 GC.start と同じです。
どこからも参照されなくなったオブジェクトを回収します。
GC.start と同じです。
@param full_mark マイナー GC を動作させる場合は false を、そうでない場
合は true を指定します。
@param immediate_sweep sweep を遅らせる(Lazy Sweep を行う)場合は false
を、そうでない場合は true を指定します。
注意: これらのキーワード引数は Ruby の実装やバージョンによって異なりま
す。将来のバージョンとの互換性も保証されませ... -
GC
. start(full _ mark: true , immediate _ sweep: true) -> nil (24055.0) -
ガーベージコレクトを開始します。
ガーベージコレクトを開始します。
GC#garbage_collect や ObjectSpace.#garbage_collect と同じ働きをします。
GC.disable により GC が禁止されている場合でもガベージコレクトを開始します。
nil を返します。
@param full_mark マイナー GC を動作させる場合は false を、そうでない場
合は true を指定します。
@param immediate_sweep sweep を遅らせる(Lazy Sweep を行う)場合は false
...