exercism/elixir/bread-and-potions/HINTS.md

1.4 KiB

Hints

General

1. Define edibility

  • There is a special macro for defining protocols.
  • Protocols consist of one or more function headers.
  • A function header is like a function definition, but without the do block. It defines the function name and its arguments, but not what it does.

2. Make loaves of bread edible

  • There is a special macro for implementing a protocol for a given data type.
  • Implementing a protocol means writing a function definition for each function header from the protocol.

3. Make mana potions edible

  • There is a special macro for implementing a protocol for a given data type.
  • Implementing a protocol means writing a function definition for each function header from the protocol.

4. Make poisons edible

  • There is a special macro for implementing a protocol for a given data type.
  • Implementing a protocol means writing a function definition for each function header from the protocol.