<p dir="ltr">> I don't think that code snippets presented without motivation, explanation, or commentary are an effective way to teach.</p>
<p dir="ltr">I agree, they are not.</p>
<p dir="ltr">However it took me a better part of today  to write this snippet.</p>
<p dir="ltr">If I saw it as it is, I could proceed with my coding task without delay.</p>
<p dir="ltr">I posted it just in case someone faces a similar problem and could benefit from it.</p>
<p dir="ltr">This is to complement other available materials, not to replace them.</p>