Minor improvements to Iterable.scan()