Task/Generator-Exponential/Ruby/generator-exponential-2.rb
# This solution uses three generators.
This solution uses three generators.
This solution uses three generators .
def powers(m)
  return enum_for(__method__, m) unless block_given?
  n = 0
  loop { yield n ** m; n += 1 }
end
def powers ( m ) return enum_for ( __method__ , m ) unless block_given? n = 0 loop { yield n ** m ; n += 1 } end
This solution uses three generators.
This solution uses three generators .
m
<not_specific>