回答編集履歴
1
Numbered parameters
test
CHANGED
@@ -32,7 +32,7 @@
|
|
32
32
|
|
33
33
|
limit = gets.to_i
|
34
34
|
|
35
|
-
fibo = Enumerator.produce([0,1]){
|
35
|
+
fibo = Enumerator.produce([0,1]){[_1 + _2, _1] }
|
36
36
|
|
37
37
|
puts fibo.take_while{|n,_| n if n <= limit }.map(&:first)
|
38
38
|
|