Change `flatten` to flatten lists left to right, top down. 