Created
April 8, 2010 20:19
-
-
Save jeffp/360490 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# use inner_array for index | |
mapped_array = array.inject([]){|inner_array, value| inner_array << map_op(value, inner_array.size)} | |
#as long as each iteration pushes one item on to the inner_array | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment