Skip to content

Instantly share code, notes, and snippets.

@r00k r00k/q1.md
Last active Mar 5, 2016

Embed
What would you like to do?
Ruby Quiz Question 1

Hello there fine madam or sir!

I have a short quiz for you. It won't take long.

By the way, don't worry if there are questions you can't answer. Lots of people will be struggling along with you, so don't feel bad. You're not alone.

Let's begin!

Do you recognize the method for which this is the (simplified) source?

def mystery_method(accumulator)
  each do |element|
    accumulator = yield accumulator, element
  end

  accumulator
end

Click here for the answer, and Question 2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.