Advertisement
saasbook

each_with_flattening.rb

Jan 10th, 2012
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.10 KB | None | 0 0
  1. [1, [2, 3], 4, [[5, 6], 7]].each_with_flattening { |s| print "\#\{s\}," }
  2. >> 1, 2, 3, 4, 5, 6, 7
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement