Solutions for stream-adventure exercises 6-10.