mirror of
https://github.com/rjNemo/exercism-elixir
synced 2026-06-06 02:16:48 +00:00
12 lines
315 B
Elixir
12 lines
315 B
Elixir
defmodule BoutiqueSuggestions do
|
|
def get_combinations(tops, bottoms, options \\ []) do
|
|
max = Keyword.get(options, :maximum_price, 100)
|
|
|
|
for top <- tops,
|
|
bottom <- bottoms,
|
|
top.base_color != bottom.base_color,
|
|
top.price + bottom.price < max do
|
|
{top, bottom}
|
|
end
|
|
end
|
|
end
|