Solution for P16
Solution for P17
Fixes indentation.
Solution for P18.

This also promotes drop- and take- so they can be used for slicing.