Array.diff

Elixir

defmodule ArrayDiff do
  def array_diff(a, b) do
    Enum.filter(a, fn(val) -> !Enum.member?(b, val) end)
  end
end

Tags

  1. elixir (Private)
  2. 6-kyu (Private)
  3. codewars (Private)
  4. answer (Private)