Small utility functions for getting slices of length one.
This used to be in the standard library, but was removed. So here you go!