Module: Enumerable

Defined in:
lib/benchcc/ext/enumerable.rb

Instance Method Summary collapse

Instance Method Details

#foldr(state, &block) ⇒ Object



2
3
4
# File 'lib/benchcc/ext/enumerable.rb', line 2

def foldr(state, &block)
  reverse.inject(state) { |state, x| block.call(x, state) }
end