Cobalt interview question

Create a function that reverses a linked list.