るりまサーチ

最速Rubyリファレンスマニュアル検索!
33件ヒット [1-33件を表示] (0.032秒)
トップページ > クエリ:select[x] > クラス:Enumerator::Lazy[x] > ライブラリ:ビルトイン[x] > 種類:インスタンスメソッド[x]

別のキーワード

  1. _builtin select
  2. _builtin select!
  3. dbm select
  4. env select
  5. gdbm select

キーワード

検索結果

Enumerator::Lazy#select {|item| ... } -> Enumerator::Lazy (15133.0)

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

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

@raise ArgumentError ブロックを指定しなかった場合に発生します。

//emlist[例][ruby]{
1.step.lazy.find_all { |i| i.even? }
# => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1:...
...step>>:find_all>

1.step.lazy.select { |i| i.even? }.take(10).force
# => [2, 4, 6, 8, 10, 12, 14, 16, 18, 20]
//}

@see Enumerable#select...

Enumerator::Lazy#filter {|item| ... } -> Enumerator::Lazy (33.0)

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

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

@raise ArgumentError ブロックを指定しなかった場合に発生します。

//emlist[例][ruby]{
1.step.lazy.find_all { |i| i.even? }
# => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1:...
...step>>:find_all>

1.step.lazy.select { |i| i.even? }.take(10).force
# => [2, 4, 6, 8, 10, 12, 14, 16, 18, 20]
//}

@see Enumerable#select...

Enumerator::Lazy#find_all {|item| ... } -> Enumerator::Lazy (33.0)

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

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

@raise ArgumentError ブロックを指定しなかった場合に発生します。

//emlist[例][ruby]{
1.step.lazy.find_all { |i| i.even? }
# => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1:...
...step>>:find_all>

1.step.lazy.select { |i| i.even? }.take(10).force
# => [2, 4, 6, 8, 10, 12, 14, 16, 18, 20]
//}

@see Enumerable#select...

Enumerator::Lazy#eager -> Enumerator (28.0)

自身を遅延評価しない Enumerator に変換して返します。

...ch.lazy

# select が遅延評価されるので終了する
p lazy_enum.class # => Enumerator::Lazy
p lazy_enum.select { |n| n.even? }.first(5)
# => [2, 4, 6, 8, 10]

# select が遅延評価されないので終了しない
enum = lazy_enum.eager
p enum.class # => Enumerator
p enum.select { |n| n....