Completed exercise 6 of stream adventure.