Class Array
In: lib/extensions.rb
Parent: Object
Array Fixnum dot/f_11.png

Methods

eachAfter   foldLeft   rest  

Public Instance methods

[Source]

# File lib/extensions.rb, line 18
    def eachAfter(element, &block)
        self[self.index(element) + 1, self.length].each { |x|
            yield x
        }
    end

[Source]

# File lib/extensions.rb, line 10
    def foldLeft(function)
        if self.size == 1
            return self.first
        else
            return function.call(self.first, self.rest.foldLeft(function))
        end
    end

[Source]

# File lib/extensions.rb, line 4
    def rest
        retval = self.clone
        retval.shift
        return retval
    end

[Validate]