Code snippets that illustrate ideas nicley

  1. take params object map to equality filter
def get_by(module, params) do
    Enum.find all(module), fn map ->
​    Enum.all?(params, fn {key, val} -> Map.get(map, key) == val end)
  end
end