Find the sum of Fibonacci sequence I have already done many of the Project Euler questions in other languages before, but whenever learning a new language, I like to do the problems again in that language. 

Here is my elixir version of 


  Find the sum of all Fibonacci numbers below 4,000,000.


stream = Stream.unfold({0,1}, fn {a, b} -&gt; {a, {b, a + b}} end)
Enum.reduce_while(stream, 0, &amp;(
    cond do
        &amp;1 &lt; 4000000 and rem(&amp;1, 2) == 0 -&gt;
            {:cont, &amp;2 + &amp;1}
        &amp;1 &lt; 4000000 -&gt;
            {:cont, &amp;2}
        true -&gt;
            {:halt, &amp;2}
    end
))


Can anyone spot a way to make my code fit the elixir paradigm more? Are there things I could improve?
I'd improve two things:


take advantage of ability to specify multiple clauses for anonymous function,
use underscore for big numbers to improve code readability.


My take on your code:

{0, 1}
|&gt; Stream.unfold(fn {a, b} -&gt; {a, {b, a + b}} end)
|&gt; Enum.reduce_while(0, fn
  value, acc when value &lt; 4_000_000 and rem(value, 2) == 0 -&gt; {:cont, acc + value}
  value, acc when value &lt; 4_000_000 -&gt; {:cont, acc}
  _value, acc -&gt; {:halt, acc}
end)