Now that we have a good understanding of how he linked this works, we're going to take the time to
begin creating our own implementation for a linked list.
So the first thing I want to do is create a new lib.
That way we can use test cases to evaluate our solutions.
So I created a new LIB called it section 21.
So we're going to want to go ahead and change into that directory as well as open up the lib rs file.
We can get rid of all this boilerplate code.
Now we are ready to begin setting up our linked list.
So the first thing that we want to do from what we saw in the previous lecture is we want to create
our node struct and we're going to have it over generic t.
That way we can use any kind of elemental data, data that we would like.
So we'll have our first element of type T, and then we're going to have our next, which is going to
point to a custom data type of linked T.
And remember next is going to point to our memory address.
So let's go ahead and create our custom type link T and we're going to give it an option.
Because if you recall, our head can point to a none.
So with option, we can either point to some or to a none.
So we want to use an option here.
That way we can also point to a none, and we're going to give it a box that's going to contain a node
T and now we want to create our struct that's going to hold our head, which is going to also be our
list.
And we're going to have our head, which is going to be of a custom type link t that we just created
here.
So this looks like a good starting point and to getting our link list set up.
So in the next lecture, we're going to take some time to implement some methods into our linked list.