Fixed subtle bug in diagonalize -- now it only ends the stream when the [[a]] runs out, rather than ending whenever it tries to return an empty diagonal.