P01 (*) Find the last element of a linked list.

Example:

List(1, 1, 2, 3, 5, 8).last

Result:

8

Implementation:

extension List {
    var last: T? {
        ...
    }
}

Instructions

To start solving this problem, after setting up your username, run this command:

$ swift run solve p01
Created solution template: Solutions/<username>/p01_<username>.swift

Once you have implemented your solution, run this command to test it:

$ swift run test <username>

If all tests pass, congratulations! 🎉

Please submit your solution by creating a pull request.