exercism/elixir/boutique-suggestions/HINTS.md

1.3 KiB

Hints

General

  • Read about comprehensions in the Getting Started guide.
  • Read about lists in the Getting Started guide.
  • Read about maps in the Getting Started guide.
  • Read about keyword Lists in the Getting Started guide.

1. Suggest a combination

  • In the list comprehension, use two generators to create the cartesian product.

2. Filter out clashing outfits

  • You can use pattern matching to deconstruct in the generator to bind the fields to a variable.
  • Use a filter expression to return false when the base colors match.

3. Filter by combination price

  • There a number of keyword list functions available to use to retrieve options from a keyword list.
  • Use a filter expression to return false when the combined price is greater than the maximum price.