Skip to content

Instantly share code, notes, and snippets.

🤓

Nico Saueressig NicoSa

🤓
View GitHub Profile
View gist:11178291
class Array
def skip_first?(accumulator)
return 1 if accumulator.nil?
return 0 unless accumulator.nil?
end
def my_inject(accumulator = nil)
start = skip_first? accumulator
accumulator ||= self.first
You can’t perform that action at this time.