This is a troll, or the author completely lacks any
pedagogical skills. The offending (sic) code:<p><pre><code> arr.each { |elem| puts elem }
</code></pre>
Explanation: There is a function "each" that applies to arrays. "Each", for each element in the array, binds "elem" to the element value, then executes the body of the code block. The code applies "each" to array "arr" and executes "puts elem" for each element. Concepts: variable, binding, function, block, array. Done.<p>The prosecution charges:<p>> Variables<p>Basic elementary concept, if you don't get this, you should not be coding yet.<p>> Arrays<p>Basic elementary concept, if you don't get this, you should not be coding yet.<p>> Enumerable<p>I have no idea what enumerable is, but I can read the code just fine.<p>> Inheritance<p>I have no idea what inheritance means in this context, but I can read the code just fine.<p>> Mixins vs. Multiple Inheritance<p>For lack of better words, wtf is the author talking about?<p>> Message passing and dispatch.<p>Ditto wtf.<p>> Function calls.<p>Basic elementary concept, if you don't get this, you should not be coding yet.<p>> Blocks passed to function calls.<p>Arguably basic elementary concept, in spite of the long tradition of Basic teaching us otherwise. But then Basic taught us GOTO is a good idea, fortunately we've got past that idea eons ago.<p>> Yielding variables to blocks.<p>I have no idea what yielding is or how it helps in this context. Still I can understand the code just fine.<p>> Scope, specifically for blocks.<p>Scope is a subcategory of variables, if you don't get scoping then you don't get variables, see blurb on "Variables" section.