Find the sum of Fibonacci sequence
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)