1.6 KiB
1.6 KiB
Hints
General
- Read about the
Agent
module in the Getting Started guide. - Read the documentation about the
Agent
module. - Watch ElixirCasts: Introduction to Agents.
1. Open the garden
- Review the
Agent
documentation. - The function to initialize the state of the agent process must return the initial state.
2. List the registrations
- The
Agent
module contains many functions to obtain the current state of the agent process.
3. Register plots to a person
- The
Agent
module contains functions to obtain and update the state of the agent process. - The functions generally require a function which transforms the state and returns a specific form.
- In order to keep track of the id for the next plot to assign, your agent process's state needs to keep track of the plots and also the next id to use for a plot.
4. Release plots
- The
Agent
module contains functions to obtain and update the state of the agent process. - The functions generally require a function which transforms the state and returns the next state.
5. Get a registered plot
- The
Agent
module contains functions to obtain the state of the agent process. - Obtain the plot from, then handle the result to return the correct result.