1.7 KiB
1.7 KiB
Hints
General
- Read about keyword lists in the official Getting Started guide.
- Read about keyword lists on elixirschool.com.
- Take a look at the documentation of the
Keyword
module.
1. Explain wine colors
- You need to write the information given in the table as a keyword list.
- Take a look at some examples of how to define a keyword list.
2. Get all wines of a given color
- There is a built-in function for getting the list of all values for a given key.
3. Get all wines of a given color bottled in a given year
- There is a built-in function for getting a single value for a given key.
- You do not need to implement the filtering of bottles on your own. You just need to conditionally use the already-implemented
filter_by_year/2
function.
4. Get all wines of a given color bottled in a given country
- There is a built-in function for getting a single value for a given key.
- You do not need to implement the filtering of bottles on your own. You just need to conditionally use the already-implemented
filter_by_country/2
function.