Map/Reduce for Mortals
this seems to be a syntax problem.  The for loop is not really &#x27;equivalent&#x27; in complexity to the functional solution.  In Elixir, I&#x27;d do this:<p><pre><code>   list
   |&gt; Enum.reduce(0, fn -&gt;
      x, acc when mod(x, 3) == 0 -&gt; acc + x * x
      _, acc -&gt; acc
   end)
</code></pre>
But the presented functional solution throws more functions at it, which might look like this, which I think is quite clear.<p><pre><code>    list
    |&gt; Enum.filter(&amp;(mod(&amp;1, 3) == 0))
    |&gt; Enum.map(&amp;(&amp;1 * &amp;1))
    |&gt; Enum.reduce(acc, &amp;Kernel.+&#x2F;2)  #better yet use Enum.sum</code></pre>