I have a function that inside it's `Enum.reduce` tries to update a Map. Now I'm not sure you can do this but when the line `IO.puts("TEST")` is on, the code fails in the next iteration after printing `TEST`. If I remove that line, the code works.

```
   def to_table({team, matches}, table) do
    Enum.reduce matches, table, fn({vteam, result}, table) ->
      %{f: lo, a: vi} = result
      cond do
        lo == vi ->
          put_in(table, [team], table[team] + 1)
          put_in(table, [vteam], table[vteam] + 1)
          IO.puts("TEST")
        lo > vi ->
          put_in(table, [team], table[team] + 3)
        lo < vi ->
          put_in(table, [vteam], table[vteam] + 3)
      end
    end
  end

```

Is this the correct syntax for `cond` ? Why this error seems so random ?