exercism/elixir/kitchen-calculator/HINTS.md

1.5 KiB

Hints

General

  • Tuples are data structures which are arranged in contiguous memory and can hold any data-type.
  • Atoms may be used to denote finite states, as this exercise uses :cup, :fluid_ounce, :teaspoon, :tablespoon, :milliliter to denote the units used.
  • You may use Kernel or Tuple functions or pattern matching to manipulate the tuples.

1. Get the numeric component from a volume-pair

2. Convert the volume-pair to milliliters

3. Convert the milliliter volume-pair to another unit

4. Convert from any unit to any unit

  • Reuse the functions already created to perform the conversion in the convert/2 function.