Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Commit

Permalink
map do not need result
Browse files Browse the repository at this point in the history
  • Loading branch information
katorie committed Apr 1, 2015
1 parent d7299ad commit d0979d7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions array/blocks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,13 @@ def lookup_mail_addresses2(table, logins)
def fizz_buzz2(seq)
seq.map {|n|
if n % 3 == 0 && n % 5==0
result << "Fizz Buzz"
"Fizz Buzz"
elsif n % 3 == 0
result << "Fizz"
"Fizz"
elsif n % 5 == 0
result << "Buzz"
"Buzz"
else
result << n
n
end
}
end
Expand Down

0 comments on commit d0979d7

Please sign in to comment.