title: Elixir - do nothing under particular case condition
body: <p>In a <code>case</code> statement in Elixir, is it possible to do nothing if a particular condition is met in a <code>case</code> statement? Or must something always be returned?</p>
  
  <p>To illustrate, here's a snippet from a Phoenix app that I'm working on:</p>
  
  <pre><code>Enum.map(record_params, fn(record_id) -&gt;
      record = Repo.get!(Record, record_id)
      case Repo.update(record) do
          {:ok, struct} -&gt;
              # I DON'T REALLY NEED ANYTHING TO HAPPEN HERE... BUT I HAVE TO HAVE A CLAUSE TO MATCH WHEN THE UPDATE RETURNS {:ok, struct}
              IO.inspect struct
          {:error, changeset} -&gt;
              errors = parse_errors(changeset)
              IO.inspect errors
              json(conn |&gt; put_status(400), %{status: "error", message: "There was a problem updating this record.", errors: errors})
                  end
  end)
  </code></pre>
  
  <p>If the <code>record</code> is updated, I need to know if there's an error, get information about it, and return that to the client, hence the need for the <code>case</code> statement... but I don't really need to do anything if the record has been updated successfully - <code>{:ok, struct}</code>.  Since these updates are taking place inside an <code>Enum.map()</code>, if the update is successful, I just want the map to continue to loop through the <code>record_ids</code>.</p>
  
  <p>For the time being, I've just been putting <code>IO.inspect struct</code> in the success condition - this is harmless, but not really necessary.  I'd prefer to clean up my code, if possible.  I can't remove the <code>{:ok, struct}</code> condition due to Elixir's pattern matching, and if I put nothing at all under that condition, I get the error <code>syntax error before: '-&gt;'</code>.</p>
  
  <p>Now I am totally new to Elixir (and the functional programming paradigm, in general), so if there is a more 'Elixirish' way to handle this sort of scenario, I would love to hear about it.</p>