How would I pass an index through a series of code blocks?
# i'm not sure how to set this up
def call(index=0, &block) # index here is likely not needed
yield (index+1) # or block.call(index)
end
call{call{call{}}}
should give a total count (3) and the count at each call preferably without having to explicitly use call { |i| call{ |i| } }