An API will have to be created to organize a queue of people.
You will need to create an *API* which will organize a queue of people, so that a program can organize a queue of people.
Using the given code declare the following functions:
The program requires the following functionsAdd the following associated functions to the `Queue` structure:
- `new` which will initialize the `Queue`
- `new`: which will initialize the `Queue`.
- `add` which receives the person's information, so it can be added to the `Queue`
- `add`: which receives a person's information, to add them to the `Queue`.
- `invert_queue` which inverts the queue of persons
- `invert_queue`: which reverses the queue.
- `rm`, which will remove the person who finished ordering their food.
- `rm`: which will remove the person who finished ordering their food. The removal should respect the FIFO method (first in first out. The function should return the removed person.
The removal should respect a FIFO system (first in first out). This function should return a tuple wrapped in an `Option` with the information of the removed person (check the usage)
The removal should respect a FIFO system (first in first out). This function should return a tuple wrapped in an `Option` with the information of the removed person (check the usage)
- `search`, which returns a tuple with the information of a given person `id`
- `search`: which returns a tuple with the information of a given person `id`
You must also create a type called `Link`. This will be the connection of the structures `Queue` and `Person`.
You must also create a type called `Link`. This will be the connection of the structures `Queue` and `Person`.
Do not forget that this will be a recursion type and it must point to `None` if there is no persons.
Do not forget that this will be a recursion type and it must point to `None` if there is no persons.