るりまサーチ (Ruby 2.3.0)

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

別のキーワード

  1. matrix each_with_index
  2. _builtin with_index
  3. mkmf with_config
  4. mkmf with_werror
  5. prime with_index

検索結果

Prime::PseudoPrimeGenerator#with_index -> Enumerator (63382.0)

与えられたブロックに対して、素数を0起点の連番を渡して評価します。

...を返します。 ブロックを与えられなかった場合は Enumerator を返します。

//emlist[例][ruby]{
require 'prime'
Prime
::EratosthenesGenerator.new(10).each_with_index do |prime, index|
p [prime, index]
end
# [2, 0]
# [3, 1]
# [5, 2]
# [7, 3]
//}

@see Enumerator#with_index...

Prime::PseudoPrimeGenerator#with_index {|prime, index| ... } -> self (63382.0)

与えられたブロックに対して、素数を0起点の連番を渡して評価します。

...を返します。 ブロックを与えられなかった場合は Enumerator を返します。

//emlist[例][ruby]{
require 'prime'
Prime
::EratosthenesGenerator.new(10).each_with_index do |prime, index|
p [prime, index]
end
# [2, 0]
# [3, 1]
# [5, 2]
# [7, 3]
//}

@see Enumerator#with_index...

Prime::PseudoPrimeGenerator#each_with_index -> Enumerator (36682.0)

与えられたブロックに対して、素数を0起点の連番を渡して評価します。

...を返します。 ブロックを与えられなかった場合は Enumerator を返します。

//emlist[例][ruby]{
require 'prime'
Prime
::EratosthenesGenerator.new(10).each_with_index do |prime, index|
p [prime, index]
end
# [2, 0]
# [3, 1]
# [5, 2]
# [7, 3]
//}

@see Enumerator#with_index...

Prime::PseudoPrimeGenerator#each_with_index {|prime, index| ... } -> self (36682.0)

与えられたブロックに対して、素数を0起点の連番を渡して評価します。

...を返します。 ブロックを与えられなかった場合は Enumerator を返します。

//emlist[例][ruby]{
require 'prime'
Prime
::EratosthenesGenerator.new(10).each_with_index do |prime, index|
p [prime, index]
end
# [2, 0]
# [3, 1]
# [5, 2]
# [7, 3]
//}

@see Enumerator#with_index...